Is there a way with git to ignore local changes to a file but continue tracking it into the remote repo ?
I wan’t to fetch but not push a file.
In my case, I want the .project eclipse file to be committed the first time on the “master” repo, but the dev team doesn’t have to push changes made by eclipse plugin.
Though not an official way, this is the workflow we use:
Rename and add add
.exampleat the end of the filename.Add the actual filename to your
.gitignorefile (and commit the.gitignorefile).Locally, copy the file to a copy that has the actual filename (now being ignored).