X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-submodule.txt;h=c243ee552bb4bc715b8903163b0136b32097af04;hb=a7793a749115ead3b8f7447ce1e96572ea5d8ea3;hp=cd9c167e0aa063205bbfae2a27bc49c4334b903d;hpb=8769e93327f5efc26d179d794a67a5b993cd3693;p=git.git diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index cd9c167e0..c243ee552 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -125,6 +125,8 @@ too (and can also report changes to a submodule's work tree). init:: Initialize the submodules, i.e. register each submodule name and url found in .gitmodules into .git/config. + It will also copy the value of `submodule.$name.update` into + .git/config. The key used in .git/config is `submodule.$name.url`. This command does not alter existing information in .git/config. You can then customize the submodule clone URLs in .git/config @@ -138,7 +140,7 @@ update:: checkout the commit specified in the index of the containing repository. This will make the submodules HEAD be detached unless `--rebase` or `--merge` is specified or the key `submodule.$name.update` is set to - `rebase` or `merge`. + `rebase`, `merge` or `none`. + If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the @@ -146,6 +148,10 @@ submodule with the `--init` option. + If `--recursive` is specified, this command will recurse into the registered submodules, and update any nested submodules within. ++ +If the configuration key `submodule.$name.update` is set to `none` the +submodule with name `$name` will not be updated by default. This can be +overriden by adding `--checkout` to the command. summary:: Show commit summary between the given commit (defaults to HEAD) and @@ -184,7 +190,7 @@ commit for each submodule. sync:: Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules. It will only affect those - submodules which already have an url entry in .git/config (that is the + submodules which already have a URL entry in .git/config (that is the case when they are initialized or freshly added). This is useful when submodule URLs change upstream and you need to update your local repositories accordingly.