views:

116

answers:

1

I have a file which ended up being versioned in our repository but shouldn't have been. For arguments sake, the file is config.py. We instead version config.py.tpl but never the actual production config for the obvious reasons.

What's the right way to stop versioning this file without deleting it locally from the working directory? Also want to make sure that it doesn't show up next time the repo is archived and untarred in production.

I've already added the file to .gitignore.

+10  A: 

To remove it from the repository use the following command and keep it in the gitignore:

git rm --cached config.py
seth