We have a number of configuration files that contain information, such as a url, that need to be modified for our developer environment. We create the developer environment as a branch in git, and make the changes to the configuration files. The problem is that when we merge the development branch back to the master branch, it changes the configuration files in the master branch.
We would like to store the files in git, so I do not believe we can use .gitignore. We need to keep all of our source in the repo since we are using elastic beanstalk, and need to deploy the entire source each time.
We have tried to use .gitattributes, and read many of the posts, such as How do I tell git to always select my local version for conflicted merges on a specific file?, but it appears that the merge driver that you setup in .gitattributes will only be called if there is a change to both files. In our case we will not be changing the configuration files in the master branch, so the merge driver is never called.
Is there an easy way to do this without writing a script?