diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-submodule.txt | 15 | ||||
-rw-r--r-- | Documentation/gitmodules.txt | 6 |
2 files changed, 17 insertions, 4 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index f993469dc6..2289d11f0e 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -113,8 +113,9 @@ init:: update:: Update the registered submodules, i.e. clone missing submodules and checkout the commit specified in the index of the containing repository. - This will make the submodules HEAD be detached unless '--rebase' is - specified or the key `submodule.$name.update` is set to `rebase`. + 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`. + If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the @@ -187,6 +188,16 @@ OPTIONS If the key `submodule.$name.update` is set to `rebase`, this option is implicit. +--merge:: + This option is only valid for the update command. + Merge the commit recorded in the superproject into the current branch + of the submodule. If this option is given, the submodule's HEAD will + not be detached. If a merge failure prevents this process, you will + have to resolve the resulting conflicts within the submodule with the + usual conflict resolution tools. + If the key `submodule.$name.update` is set to `merge`, this option is + implicit. + <path>...:: Paths to submodule(s). When specified this will restrict the command to only operate on the submodules found at the specified paths. diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt index 1b67f0a9f1..5daf750d19 100644 --- a/Documentation/gitmodules.txt +++ b/Documentation/gitmodules.txt @@ -35,9 +35,11 @@ submodule.<name>.update:: If 'checkout' (the default), the new commit specified in the superproject will be checked out in the submodule on a detached HEAD. If 'rebase', the current branch of the submodule will be rebased onto - the commit specified in the superproject. + the commit specified in the superproject. If 'merge', the commit + specified in the superproject will be merged into the current branch + in the submodule. This config option is overridden if 'git submodule update' is given - the '--rebase' option. + the '--merge' or '--rebase' options. EXAMPLES |