Git ignore push only

Is there a way with git to ignore local changes in the file, but keep track of it in the remote repo? I do not want, but I do not click on the file.

In my case, I want the project .project eclipse file to be fixed for the first time on the "main" repo, but the development team does not need to introduce the changes made by the eclipse plugin.

+5
source share
1 answer

Although this is not an official way, it is a workflow that we use:

Rename and add add .exampleto the end of the file name.

Add the actual file name to your .gitignorefile (and commit the file .gitignore).

Copy the file locally to the copy that has the actual file name (now ignored).

+1

All Articles