I want to remove a file from my repository.
git rm file_to_remove.txt
will remove the file from the repository, but it will also remove the file from the local file system. How do I remove this file from the repo without deleting my local copy of the file?
The
git rmdocumentation states:So, for a single file:
and for a single directory: