Instantly share code, notes, and snippets.

Embed
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

From http://www.seanius.net/blog/2011/02/git-merge-s-theirs/

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