I have a repository for a WordPress intall that currently has all the WordPress files included.
I have updated my .gitignore to only include the theme folder but when I push to my staging server it deletes all the files.
I need to keep all the files both locally and on the server, but I want them to stop being tracked and removed from the repository, Ideally with the history still intact.
Thanks in Advance
The server has a copy of the repository, so if you remove anything from the repository it will be removed from the server’s repository as well (after you push).
However, you can set git to assume the files are unchanged. This will keep them in the repository, but git will stop detecting new changes to them.