I have a file that is in a repository and added to .gitignore. When I build the project, this file gets modified, but changes are purposely local and shouldn't end up in the repo. The file presence is also required in the repo so I can't remove it.
The problem is that whenever I do git pull I get conflict, due to a fact that the file has been changed locally, and I need to remove this file for pull to finish successfully. Is it possible to ignore merge conflicts in this file and always replace it with a version from the repository?