tags:

views:

178

answers:

1

git-rebase man page mentions -X<option> can be passed to git-merge. When/how exactly?

I'd like to rebase by applying patches with recursive strategy and theirs option (apply whatever sticks, rather than skipping entire conflicting commits). I don't want merge, I want to make history linear.

I've tried:

git rebase -Xtheirs

and

git rebase -s 'recursive -Xtheirs'

but git rejects -X in both cases.

+1  A: 

This is for merge strategies that come with their own set of options

git rebase -s recursive -X theirs

should work, although this patch mentions (February 2010):

The manpage says that git-rebase supports merge strategies, but the rebase command doesn't know about -X, and gives the usage when presented with it.

So if it still doesn't work, it is being debated right now!

VonC
`-X theirs` (with space) didn't work either in git 1.7.1.
porneL
@porneL: I thought so. Hence my link to the patch proposal.
VonC
@porneL: Yeah, I've noticed this bug too - I expect it'll get addressed before long though, whether with that patch or otherwise, since all the basic facilities are there; they just have to decide exactly how they're going to communicate from rebase to merge.
Jefromi