How do I select a merge strategy for a git rebase? -


git-rebase man page mentions -x<option> can passed git-merge. when/how exactly?

i'd rebase applying patches recursive strategy , theirs option (apply whatever sticks, rather skipping entire conflicting commits). don't want merge, want make history linear.

i've tried:

git rebase -xtheirs 

and

git rebase -s 'recursive -xtheirs' 

but git rejects -x in both cases.


git rebase -xtheirs works in recent versions, except tree conflicts need resolved manually. need run git rebase -xtheirs --continue (with -x repeated) after resolving conflicts.

you can use git v1.7.3 or later versions.

git rebase -s recursive -x theirs ${branch} 

from git v1.7.3 release notes:

git rebase --strategy <s> learned -x option pass options understood chosen merge strategy.

nb: "ours" , "theirs" mean opposite of during straight merge. in other words, "theirs" favors commits on current branch.

update: edited clearer.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -