Reputation: 34215
After I solved all merge conflicts I care about, I want to merge regardless of all remaining conflicts. I'd like git to keep the files from the branch I want to merge into (--ours
strategy).
How can I do that?
Upvotes: 15
Views: 46823
Reputation: 5221
It is a bad idea to commit binaries, but i'll explain to you how to make what you need
you are in branch special and you have done a merge, you have fixed some conflicts and you want to let others like in branch master so you should make this
git reset --mixed (reset the index but not the working tree; changes remain localy but not used in the commit)
git add {files those you have fixed the conflict}
git commit
git reset --hard
git merge --strategy=recursive -X theirs origin/master
{merge twice and you take files as in branch origin/master}
you use master if changes are in your local repository, if changes are in distant repository, you use origin/master
Upvotes: 20