]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-submodule.txt
git-submodule: add support for --merge.
[thirdparty/git.git] / Documentation / git-submodule.txt
index 2f207fbbda04c176cedd5a88c88f74e2ac97cf2e..2289d11f0e350886296bf961a9acb2e9b6f0ffd9 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 'git submodule' [--quiet] add [-b branch] [--] <repository> <path>
 'git submodule' [--quiet] status [--cached] [--] [<path>...]
 'git submodule' [--quiet] init [--] [<path>...]
-'git submodule' [--quiet] update [--init] [--] [<path>...]
+'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--] [<path>...]
 'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
 'git submodule' [--quiet] foreach <command>
 'git submodule' [--quiet] sync [--] [<path>...]
@@ -113,7 +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.
+       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
@@ -172,6 +174,30 @@ OPTIONS
        (the default). This limit only applies to modified submodules. The
        size is always limited to 1 for added/deleted/typechanged submodules.
 
+-N::
+--no-fetch::
+       This option is only valid for the update command.
+       Don't fetch new objects from the remote site.
+
+--rebase::
+       This option is only valid for the update command.
+       Rebase the current branch onto the commit recorded in the
+       superproject. If this option is given, the submodule's HEAD will not
+       be detached. If a a merge failure prevents this process, you will have
+       to resolve these failures with linkgit:git-rebase[1].
+       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.