]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-submodule.txt
Merge branch 'ph/submodule-rebase'
[thirdparty/git.git] / Documentation / git-submodule.txt
index 2289d11f0e350886296bf961a9acb2e9b6f0ffd9..470bd75ad9ca7760bef33c1c4a326c79da92eb2b 100644 (file)
@@ -9,10 +9,12 @@ git-submodule - Initialize, update or inspect submodules
 SYNOPSIS
 --------
 [verse]
-'git submodule' [--quiet] add [-b branch] [--] <repository> <path>
+'git submodule' [--quiet] add [-b branch]
+             [--reference <repository>] [--] <repository> <path>
 'git submodule' [--quiet] status [--cached] [--] [<path>...]
 'git submodule' [--quiet] init [--] [<path>...]
-'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--] [<path>...]
+'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
+             [--reference <repository>] [--] [<path>...]
 'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
 'git submodule' [--quiet] foreach <command>
 'git submodule' [--quiet] sync [--] [<path>...]
@@ -179,15 +181,6 @@ OPTIONS
        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
@@ -198,6 +191,23 @@ OPTIONS
        If the key `submodule.$name.update` is set to `merge`, this option is
        implicit.
 
+--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.
+
+--reference <repository>::
+       This option is only valid for add and update commands.  These
+       commands sometimes need to clone a remote repository. In this case,
+       this option will be passed to the linkgit:git-clone[1] command.
++
+*NOTE*: Do *not* use this option unless you have read the note
+for linkgit:git-clone[1]'s --reference and --shared options carefully.
+
 <path>...::
        Paths to submodule(s). When specified this will restrict the command
        to only operate on the submodules found at the specified paths.