Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • What is the exact form of the git rebase command you're using? Are you using any optional flags? And what scripting language are you using? Shell?
    – jub0bs
    Commented Apr 8, 2015 at 15:13
  • 3
    If you run git rebase and hit a merge conflict, the process will stop and exit with a nonzero status. You could check the exit status of the rebase operation, and, if it is nonzero, run git rebase --abort to cancel the operation.
    – jub0bs
    Commented Apr 8, 2015 at 15:15
  • 1
    Did you find a way of doing this?
    – crmpicco
    Commented Jul 8, 2015 at 14:07
  • 1
    @crmpicco I basically did what Jubobs suggested by going ahead with the rebase, checking for conflict, and aborting if needed. I wish there was a more elegant way however... Commented Jul 9, 2015 at 15:35
  • 2
    For messy rebases, I often create a new branch and do a trial run there first. If everything goes smoothly, the the trial run becomes the rebase, otherwise just switch back to the original branch.
    – jordanpg
    Commented May 30, 2017 at 14:58