Git remove from repo, keeping on file system
Snippet
Written with a loving hand by kitt some time around 11:41 on 16 July 2017
git rm
will remove a file from the file system and the repository. If you want to keep the file locally (say, because you're adding it to the .gitignore file), remove it from the repository cache:
# for a file git rm --cached filename # for a directory git rm --cached -r directoryname
Add new comment