Skip to content

Commit

Permalink
docs: move submodule section
Browse files Browse the repository at this point in the history
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 <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matt Kraai authored and Junio C Hamano committed Nov 14, 2012
1 parent 293ab15 commit 3469c7e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Documentation/git-rm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,6 @@ as well as modifications of existing paths.
Typically you would first remove all tracked files from the working
tree using this command:

Submodules
~~~~~~~~~~
Only submodules using a gitfile (which means they were cloned
with a git version 1.7.8 or newer) will be removed from the work
tree, as their repository lives inside the .git directory of the
superproject. If a submodule (or one of those nested inside it)
still uses a .git directory, `git rm` will fail - no matter if forced
or not - to protect the submodule's history.

A submodule is considered up-to-date when the HEAD is the same as
recorded in the index, no tracked files are modified and no untracked
files that aren't ignored are present in the submodules work tree.
Ignored files are deemed expendable and won't stop a submodule's work
tree from being removed.

----------------
git ls-files -z | xargs -0 rm -f
----------------
Expand Down Expand Up @@ -149,6 +134,21 @@ use the following command:
git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached
----------------

Submodules
~~~~~~~~~~
Only submodules using a gitfile (which means they were cloned
with a git version 1.7.8 or newer) will be removed from the work
tree, as their repository lives inside the .git directory of the
superproject. If a submodule (or one of those nested inside it)
still uses a .git directory, `git rm` will fail - no matter if forced
or not - to protect the submodule's history.

A submodule is considered up-to-date when the HEAD is the same as
recorded in the index, no tracked files are modified and no untracked
files that aren't ignored are present in the submodules work tree.
Ignored files are deemed expendable and won't stop a submodule's work
tree from being removed.

EXAMPLES
--------
`git rm Documentation/\*.txt`::
Expand Down

0 comments on commit 3469c7e

Please sign in to comment.