corgrath
corgrath

Reputation: 12293

Is it possible to flag certain files to never cause merge conflicts in Git?

Is it possible, upon merges and rebases, to specify that certain files should automatically resolve in "use ours" (or some other policy) where a merge conflict would normally happen?

Upvotes: 2

Views: 120

Answers (1)

iclman
iclman

Reputation: 1436

You can use git attributes You can create a .gitattribute file in the root folder of your repo. If for example you have a file named database.xml that evolves in two different branches and you want to merge in your other branch without messing up the database file, you could set the git attribute as follows

database.xml merge=ours

Upvotes: 3

Related Questions