Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-submodule.txt14
-rw-r--r--Documentation/gitmodules.txt9
2 files changed, 21 insertions, 2 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 14256c695b..cd8e861ce4 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -13,7 +13,7 @@ SYNOPSIS
[--reference <repository>] [--] <repository> <path>
'git submodule' [--quiet] status [--cached] [--] [<path>...]
'git submodule' [--quiet] init [--] [<path>...]
-'git submodule' [--quiet] update [--init] [-N|--no-fetch]
+'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>
@@ -115,7 +115,8 @@ 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' is
+ 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
@@ -179,6 +180,15 @@ 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.
+
--reference <repository>::
This option is only valid for add and update commands. These
commands sometimes need to clone a remote repository. In this case,
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index d1a17e2625..1b67f0a9f1 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -30,6 +30,15 @@ submodule.<name>.path::
submodule.<name>.url::
Defines an url from where the submodule repository can be cloned.
+submodule.<name>.update::
+ Defines what to do when the submodule is updated by the superproject.
+ 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.
+ This config option is overridden if 'git submodule update' is given
+ the '--rebase' option.
+
EXAMPLES
--------