I have done the following (in order to learn git rm
).
Created an empty repository on an empty folder. Created a file called test.txt, modify it and then run the following (with the consequent results).
git rm test.txt -> `fatal: pathspec 'test.txt' did not match any files`
git add test.txt && git rm test.txt ->
error: 'test.txt' has changes staged in the index
(use --cached to keep the file, or -f to force removal)
So, my question is:
When would git rm
test.txt be actually useful?