From 0ebc2eed5b4de6078d4bc4f6857066ad91df7f1c Mon Sep 17 00:00:00 2001 From: William Spanfelner <42092799+Will-1-Am@users.noreply.github.com> Date: Fri, 21 Dec 2018 18:11:48 +0200 Subject: [PATCH] Create git rm (#27054) * Create git rm Create git rm description, syntax and general use cases with link to authoritative documentation. * Rename guide/english/git/git-rm/index.md to guide/english/git/git-rm.md * Rename guide/english/git/git-rm.md to guide/english/git/git-rm/index.md --- guide/english/git/git-rm/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 guide/english/git/git-rm/index.md diff --git a/guide/english/git/git-rm/index.md b/guide/english/git/git-rm/index.md new file mode 100644 index 0000000000..7474c567d8 --- /dev/null +++ b/guide/english/git/git-rm/index.md @@ -0,0 +1,13 @@ +--- +title: git rm +--- +## git rm + The git rm command removes, or deletes files from a working git tree and git index. See Git documentation for comprehensive details of the git -rm command. + The git rm command will remove a file from everywhere within the git tree as there is no option for removing a file from only the working directory. + + ### git rm --cached -r . + The wildcard "." in place of the filename position in the command git rm --cached -r . removes all files from the staging area in a recursive fashion, hence the "-r" option. The --cached option in essence protects working tree files regardless of whether modifications have been applied. + + ### git rm -n + To determine which files would be affected by the git rm command, place the -n option in the command. Executing the command will indicate the files that would be removed had the -n option not been present. +