I've a committed file "build.properties", this file has to be on our project repository as it contains important build information.
Sometime some developer performing some local testing, change the content of this file, and then they commit the changes by mistake (by simply staging all the changes they made, build.properties included).
Now I would like, somehow, to ignore all the local changes made to this file in order to avoid this situation that keep braking the build, so for example when the developer will run a *git add ** or a git commit -a, that file won't be included in the staged file.
I did already some research, but till now I cannot find any solution compatible with what i'm looking for, considering that the operation needs to be applied remotely, for example I can use the .git/info/exclude folder, but then every time a new developer will clone the repository, he will have to set the .git/info/exclude again, and I would like to avoid this.
Moreover, .gitignore works just with un-tracked file, if I add a tracked file to .gitignore, it won't be ignore at all. I found some persons suggesting to use .gitignore in combination with git rm --cached then re-add the files, but once the file were re-added to the tree, the changes were keeping being tracked, also reading from offical GIT doc, .gitignore does not look to be suitable for my needs.
Any solution in mind? Thanks!
UPDATE
I'm a big fan of SVN, and more I know GIT, more I appreciate SubVersion.
So I guess, the answer to my question is GIT does not provide any way to achieve something like this...
Agree that would not be the best of the practices and that there are other ways to achieve what i'm asking without managing it with the famous source control tool GIT, but my intention is still something quite common that we can face in many different contexts.
I mean GIT provide ways to get around most of the standard practices and principles, for example I can't change a remote history for principle, but GIT gave me the --force to achieve this, so I wonder why it does not provide an easy way to get around my issue too.