summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDamien Robert <damien.olivier.robert@gmail.com>2020-04-06 15:57:06 +0200
committerJunio C Hamano <gitster@pobox.com>2020-04-06 13:42:43 -0700
commitb3cec57338db7b01681716d072f36c29b7f770f4 (patch)
tree3bb3ddfb2070f0b524b7761b53e661b22cd40045 /Documentation
parentdd0cb7dffabf18e0e7251b04fda53d110151e811 (diff)
downloadgit-b3cec57338db7b01681716d072f36c29b7f770f4.tar.gz
doc: document --recurse-submodules for reset and restore
Also unify the formulation about --no-recurse-submodules for checkout and switch, which we reuse for restore. And correct the formulation about submodules' HEAD in read-tree, which we reuse in reset. Signed-off-by: Damien Robert <damien.olivier.robert+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-checkout.txt2
-rw-r--r--Documentation/git-read-tree.txt2
-rw-r--r--Documentation/git-reset.txt6
-rw-r--r--Documentation/git-restore.txt11
-rw-r--r--Documentation/git-switch.txt2
5 files changed, 20 insertions, 3 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index c8fb995fa7..140bd3eabb 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -296,7 +296,7 @@ Note that this option uses the no overlay mode by default (see also
submodules according to the commit recorded in the superproject. If
local modifications in a submodule would be overwritten the checkout
will fail unless `-f` is used. If nothing (or `--no-recurse-submodules`)
- is used, the work trees of submodules will not be updated.
+ is used, submodules working trees will not be updated.
Just like linkgit:git-submodule[1], this will detach `HEAD` of the
submodule.
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index da33f84f33..501f2ec375 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -118,7 +118,7 @@ OPTIONS
--[no-]recurse-submodules::
Using --recurse-submodules will update the content of all initialized
submodules according to the commit recorded in the superproject by
- calling read-tree recursively, also setting the submodules HEAD to be
+ calling read-tree recursively, also setting the submodules' HEAD to be
detached at that commit.
--no-sparse-checkout::
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 932080c55d..252e2d4e47 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -87,6 +87,12 @@ but carries forward unmerged index entries.
different between `<commit>` and `HEAD`.
If a file that is different between `<commit>` and `HEAD` has local
changes, reset is aborted.
+
+--[no-]recurse-submodules::
+ When the working tree is updated, using --recurse-submodules will
+ also recursively reset the working tree of all active submodules
+ according to the commit recorded in the superproject, also setting
+ the submodules' HEAD to be detached at that commit.
--
See "Reset, restore and revert" in linkgit:git[1] for the differences
diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 5bf60d4943..8e3b339802 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -107,6 +107,17 @@ in linkgit:git-checkout[1] for details.
patterns and unconditionally restores any files in
`<pathspec>`.
+--recurse-submodules::
+--no-recurse-submodules::
+ If `<pathspec>` names an active submodule and the restore location
+ includes the working tree, the submodule will only be updated if
+ this option is given, in which case its working tree will be
+ restored to the commit recorded in the superproject, and any local
+ modifications overwritten. If nothing (or
+ `--no-recurse-submodules`) is used, submodules working trees will
+ not be updated. Just like linkgit:git-checkout[1], this will detach
+ `HEAD` of the submodule.
+
--overlay::
--no-overlay::
In overlay mode, the command never removes files when
diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt
index 197900363b..79dbc9624d 100644
--- a/Documentation/git-switch.txt
+++ b/Documentation/git-switch.txt
@@ -183,7 +183,7 @@ name, the guessing is aborted. You can explicitly give a name with
Using `--recurse-submodules` will update the content of all
initialized submodules according to the commit recorded in the
superproject. If nothing (or `--no-recurse-submodules`) is
- used, the work trees of submodules will not be updated. Just
+ used, submodules working trees will not be updated. Just
like linkgit:git-submodule[1], this will detach `HEAD` of the
submodules.