diff options
author | Johan Herland <johan@herland.net> | 2009-06-03 00:59:12 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-03 00:09:16 -0700 |
commit | 42b491786260eb17d97ea9fb1c4b70075bca9523 (patch) | |
tree | 3c330360a9fdc6abf984c5497ae3c9668009cf10 /Documentation/git-submodule.txt | |
parent | 329484256e0fe42676e93669122e7a5a007ef4ed (diff) | |
download | git-42b491786260eb17d97ea9fb1c4b70075bca9523.tar.gz |
git-submodule: add support for --merge.
'git submodule update --merge' merges the commit referenced by the
superproject into your local branch, instead of checking it out on
a detached HEAD.
As evidenced by the addition of "git submodule update --rebase", it
is useful to provide alternatives to the default 'checkout' behaviour
of "git submodule update". One such alternative is, when updating a
submodule to a new commit, to merge that commit into the current
local branch in that submodule. This is useful in workflows where
you want to update your submodule from its upstream, but you cannot
use --rebase, because you have downstream people working on top of
your submodule branch, and you don't want to disrupt their work.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r-- | Documentation/git-submodule.txt | 15 |
1 files changed, 13 insertions, 2 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. |