aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-rm.txt
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2013-03-04 22:20:24 +0100
committerJunio C Hamano <gitster@pobox.com>2013-03-04 14:48:02 -0800
commitcf419828064d4f22a2c3134e7b46a7719462b1dc (patch)
tree5177f7dc7729576bedce02f3e218663bd7893534 /Documentation/git-rm.txt
parentf94c3251e1400c3cf349f7f84fea4db66b540113 (diff)
downloadgit-cf419828064d4f22a2c3134e7b46a7719462b1dc.tar.gz
submodule: add 'deinit' command
With "git submodule init" the user is able to tell git he cares about one or more submodules and wants to have it populated on the next call to "git submodule update". But currently there is no easy way he could tell git he does not care about a submodule anymore and wants to get rid of his local work tree (except he knows a lot about submodule internals and removes the "submodule.$name.url" setting from .git/config together with the work tree himself). Help those users by providing a 'deinit' command. This removes the whole submodule.<name> section from .git/config (either for the given submodule(s) or for all those which have been initialized if '.' is used) together with their work tree. Fail if the current work tree contains modifications (unless forced), but don't complain when either the work tree is already removed or no settings are found in .git/config. Add tests and link the man pages of "git submodule deinit" and "git rm" to assist the user in deciding whether removing or unregistering the submodule is the right thing to do for him. Also add the deinit subcommand to the completion list. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rm.txt')
-rw-r--r--Documentation/git-rm.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index 262436b7b1..dbf41621ae 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -149,6 +149,10 @@ 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.
+If you only want to remove the local checkout of a submodule from your
+work tree without committing the removal,
+use linkgit:git-submodule[1] `deinit` instead.
+
EXAMPLES
--------
`git rm Documentation/\*.txt`::