Git provides an option using .gitattributes
to ignore merge conflicts for certain files (ex: generated files) using merge strategies:
http://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Merge-Strategies
You can also use Git attributes to tell Git to use different merge strategies for specific files in your project. One very useful option is to tell Git to not try to merge specific files when they have conflicts, but rather to use your side of the merge over someone else’s.
You can set up an attribute like this:
database.xml merge=ours
And then define a dummy ours merge strategy with:
$ git config --global merge.ours.driver true
As you can see, this requires special configuration using git config
on my local machine.
I'm trying to configure this to work on GitHub (i.e., where I don't have access to git config --global
).
Is there a way I can enable a merge strategy for a pull request on GitHub?
Edit
According to How to store a git config as part of the repository? there is no default location for the Git config besides .git/config
. So afaik local config is not possible to commit to a git repo.