Git remove from repo, keeping on file system
Snippet
kitt decided around 11:41 on 16 July 2017 to publish this:
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