Git remove from repo, keeping on file system
Snippet
Posted by kitt at 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