Daan Poron Daan Poron - 2 months ago 26
Git Question

git merge recursive theirs, how does it work?

I'm having a bit of a problem. We have our own CMS which is using git for collaboration and versioning and stuff.

Now I have two git repositories A and B, A which is a project and B which is the CMS itself. Now i want to get B into A, but when i do this i get alot of merge-conflicts and the solution for the conflicts is always to use the stuff from B.

Now what I think i need is

git merge <branch> -s recursive theirs <commit>

because I want to merge and when there is a merge conflict it should be forced to use the solution from B. But i can't get it to work. It always keeps telling me
fatal: 'theirs' does not point to a commit

recursive theirs
I found here.

Does anyone know what I do wrong?

Answer Source

You must use this form to pass merge strategy options:

git merge -s recursive -Xtheirs

Also make sure your version suppors -Xtheirs, that's a quite recent feature(?)