So, a config file somehow made its way into our git repo that we don't want there. But we do want it on our individual systems.
Is there a way to get the file out of the repo without causing the file to get deleted from individual repos when our team members do a pull?
Many thanks!
You will need to remove it from repository (not working tree) using
git rm --cached
and tell your coworkers to do a backup in the first time they sync (pull) their repositories, because git will delete it.
Otherwise, even the file being present on .gitignore
, git will always detect changes when the file does part of the repository.
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