Skip to content

Commit 3469c7e

Browse files
kraaigitster
authored andcommitted
docs: move submodule section
293ab15 ("submodule: teach rm to remove submodules unless they contain a git directory", 2012-09-26) inserted the "Submodules" section between a sentence describing a command and the command. Move the "Submodules" section further down. Noticed-by: Horst H. von Brand Signed-off-by: Matt Kraai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 293ab15 commit 3469c7e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Documentation/git-rm.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,6 @@ as well as modifications of existing paths.
107107
Typically you would first remove all tracked files from the working
108108
tree using this command:
109109

110-
Submodules
111-
~~~~~~~~~~
112-
Only submodules using a gitfile (which means they were cloned
113-
with a git version 1.7.8 or newer) will be removed from the work
114-
tree, as their repository lives inside the .git directory of the
115-
superproject. If a submodule (or one of those nested inside it)
116-
still uses a .git directory, `git rm` will fail - no matter if forced
117-
or not - to protect the submodule's history.
118-
119-
A submodule is considered up-to-date when the HEAD is the same as
120-
recorded in the index, no tracked files are modified and no untracked
121-
files that aren't ignored are present in the submodules work tree.
122-
Ignored files are deemed expendable and won't stop a submodule's work
123-
tree from being removed.
124-
125110
----------------
126111
git ls-files -z | xargs -0 rm -f
127112
----------------
@@ -149,6 +134,21 @@ use the following command:
149134
git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached
150135
----------------
151136

137+
Submodules
138+
~~~~~~~~~~
139+
Only submodules using a gitfile (which means they were cloned
140+
with a git version 1.7.8 or newer) will be removed from the work
141+
tree, as their repository lives inside the .git directory of the
142+
superproject. If a submodule (or one of those nested inside it)
143+
still uses a .git directory, `git rm` will fail - no matter if forced
144+
or not - to protect the submodule's history.
145+
146+
A submodule is considered up-to-date when the HEAD is the same as
147+
recorded in the index, no tracked files are modified and no untracked
148+
files that aren't ignored are present in the submodules work tree.
149+
Ignored files are deemed expendable and won't stop a submodule's work
150+
tree from being removed.
151+
152152
EXAMPLES
153153
--------
154154
`git rm Documentation/\*.txt`::

0 commit comments

Comments
 (0)