Merge branch 'sb/pull-rebase'
[gitweb.git] / Documentation / git-submodule.txt
index 0286409744937bac5b4bed5af775f9b9834ea126..cd8e861ce4ae33b25928a16aa213933d2a38a155 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>...]
@@ -114,7 +116,7 @@ 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.rebase` is set to `true`.
+       specified or the key `submodule.$name.update` is set to `rebase`.
 +
 If the submodule is not yet initialized, and you just want to use the
 setting as stored in .gitmodules, you can automatically initialize the
@@ -184,9 +186,17 @@ OPTIONS
        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.rebase` is set to `true`, this option is
+       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.