vefsuperstore.blogg.se

Git submodule init update
Git submodule init update














I can now use all the git tools I can think of in the Examples or Admin Menu directories, including pulling (to follow a tracking branch), git bisect to debug, git checkout (to get a particular tag/version). git directories), but the parent repository (the Drupal repo in this case) knows what they are and what to do about them. This would check out Examples and Admin Menu into sites/all/modules in the Drupal tree, but as real first class git repositories (they have their own. Git submodule add -branch 7.x-3.x git:///project/admin_menu.git sites/all/modules/admin_menu Git submodule add -branch 7.x-1.x git:///project/examples.git sites/all/modules/examples

git submodule init update

They look exactly like a regular git repository, but the parent repository knows just enough about them to manipulate them.įor example, if we're using the regular Drupal checkout as our main repository and checking out Drupal modules as submodules, we might do this: git clone git:///project/drupal.git -branch 7.x Using git submodules you have one or more sub-repositories of the main one. Every change in the project is tracked in that one. git directory in the root directory of the project that contains the entire history and all the revisions for that project. In a regular git repository, you have one.

git submodule init update

They're a way of including one git repository inside another, in its entirety, and managing it from within the parent repository. What are git submodules?įirst "git submodules" have nothing to do with Drupal modules.

git submodule init update

Git submodule init update how to#

I've been using git submodules for Drupal site deployment for quite awhile now, and I wanted to share my experience (for good and bad) with others who might be interested in using submodules (and to solicit comments from those who know how to do it better). (There are screencasts illustrating these concepts at the bottom.)














Git submodule init update