Git merge - when you know you want changes from main

The solution is easy, just take the changes from the other branch.

Kalle Tolonen
16.1.2026
Last updated on 19.1.2026

git merge -X theirs other-branch

Wait - but how do you know what changes are incoming, ie. where is the conflict?

You could just try out

git merge other-branch

Some conflicts here, but I DO want to solve the conflicts by taking their changes.

git merge --abort
git merge -X theirs other-branch

Comments

No published comments yet.


Add a Comment

Your comment is held for review before it appears publicly.

Tick the box, then click Submit right away (Google expires the check after about two minutes).