diff --git a/pages/common/git-rm.md b/pages/common/git-rm.md new file mode 100644 index 000000000..83dda70ca --- /dev/null +++ b/pages/common/git-rm.md @@ -0,0 +1,15 @@ +# git rm + +> Remove files from repository index and local filesystem + +- Remove file from repository index and filesystem + +`git rm {{file}}` + +- Remove directory + +`git rm -r {{directory}}` + +- Remove file from repository index but keep it untouched locally + +`git rm --cached {{file}}`