Skip to content

Instantly share code, notes, and snippets.

Last active Oct 18, 2016
What would you like to do?
git merge -s theirs

How to do a git merge -s theirs

One way of many...

This is one way which keeps the history looking like you'd expect.

Command is equivalent to git checkout MINE; git merge -s theirs HERS.

git checkout MINE
git merge --no-commit -s ours HERS
git rm -rf .
git checkout HERS -- .
git commit


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment