Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3424420
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:28:20+00:00 2026-05-18T06:28:20+00:00

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

  • 0

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.


git rebase -Xtheirs works in recent versions, except tree conflicts need to be resolved manually. You need to run git rebase -Xtheirs --continue (with -X repeated) after resolving those conflicts.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:28:20+00:00Added an answer on May 18, 2026 at 6:28 am

    You can use this with Git v1.7.3 or later versions.

    git rebase --strategy-option theirs ${branch} # Long option
    git rebase -X theirs ${branch} # Short option
    

    (which is a short for git rebase --strategy recursive --strategy-option theirs ${branch} as stated by the documentation)

    From Git v1.7.3 Release Notes:

    git rebase --strategy <s> learned the --strategy-option/-X option to pass extra options that are understood by the chosen merge strategy.

    NB: “Ours” and “theirs” mean the opposite of what they do during a straight merge. In other words, “theirs” favors the commits on the current branch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to use git rebase so as to cleanly merge a feature in
When I start a git rebase -i , I can issue commands like git
Git has a much-touted(?) octopus-merge capability that can merge many heads into one. But
With git rebase --interactive <commit> you can squash any number of commits together into
I've been digging through the git merge and rebase docs, and something isn't sinking
I can't make git push origin B. I have situation something like this _____________________________________
I've been doing some reading on how both the git merge and git rebase
edit The question boils down to Can git rebase be instructed to rebase tags,
How do I easily undo a git rebase? A lengthy manual method is: checkout
running git instaweb in my repository opens a page that says 403 Forbidden -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.