summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-20 10:40:31 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-20 10:40:31 -0800
commitb4f35513beb30ab2b1394440b8540627fe472a19 (patch)
treeafdcd0fc290a2f092527ce2e2b58a1cb9f639893
parent3a2c08238326a219ce9d7e53d95e382ed3fb8b7c (diff)
parent3469c7ebbf41fe5fc684583dc84973b95289a6a2 (diff)
downloadgit-b4f35513beb30ab2b1394440b8540627fe472a19.tar.gz
Merge branch 'jl/submodule-rm'
* jl/submodule-rm: docs: move submodule section
-rw-r--r--Documentation/git-rm.txt30
1 files changed, 15 insertions, 15 deletions
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index 882cb1171b..262436b7b1 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -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
----------------
@@ -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`::