Thursday, February 26, 2015

Remove Files From Repository but Keep Them Locally

git rm --cached -r somedir will stage the deletion of the directory, but doesn't touch anything on disk.
You should then add somedir/ to your .gitignore file so that git doesn't try and add it back.

No comments:

Post a Comment