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.
To remove it from the repository use the following command and keep config.py
in the gitignore:
git rm --cached config.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With