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?
The simplest way, if you have unmerged paths, use git merge --abort to abort the merge. This way your code will look the same as it was before trying to merge with some other branch...
You can use the git reset --merge command. You can also use the git merge --abort command. As always, make sure you have no uncommitted changes before you start a merge.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With