Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SourceTree - rebase --interactive - Merge conflict aborts rebase

How can I use SourceTree for doing an interactive rebase on another branch, if the rebase causes merge conflicts?

What I observe: I use SourceTree to do an interactive rebase, by

  • right clicking on the branch I want to rebase upon, and
  • selecting "rebase children ...interactively".
  • SourceTree offers me the "Interactive rebase from " dialog, which allows me to squash commits, etc.
  • No matter what I instruct SourceTree to do there, if I tell SourceTree to continue by clicking OK,
  • SourceTree recognizes a merge conflict, like this:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c sequence.editor='C:\Users\DNTRAINING\AppData\Local\SourceTree\app-2.3.5\tools\stree_gri' -c core.editor='C:\Users\DNTRAINING\AppData\Local\SourceTree\app-2.3.5\tools\stree_gri' rebase -i --autosquash 1b9102ed53ec63bd6d38a9436663bf58bda590b1
Auto-merging f3.txt
CONFLICT (content): Merge conflict in f3.txt
Rebasing (1/3)
error: could not apply af56da4... feature_rebase_test02 first attempt
Resolve all conflicts manually, mark them as resolved with
"git add/rm ", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply af56da4... feature_rebase_test02 first attempt
Completed with errors, see above.

  • but does not allow me to fix the conflict,
  • but instead simply aborts the gibt rebase command and I am back at where I was in the beginning.

So, how do I do a rebase --interactive with SourceTree, if I also have merge conflicts to solve? Thanks, Klaus

like image 327
K.Isbruch Avatar asked Dec 20 '17 15:12

K.Isbruch


1 Answers

Solution

  1. Do not click the Close button on the message dialog box. Close SourceTree by right-clicking on the taskbar button and clicking close.

  2. Re-open SourceTree, resolve the conflicts and commit. (The commit message will have to be entered manually - another bug.)

  3. Click Actions > Continue Rebase.

(Repeat 1 - 3 for additional conflicts)

Cause

This behaviour is attributable to this open SourceTree bug:

https://jira.atlassian.com/browse/SRCTREEWIN-2493

(has two duplicate bugs ending in 2715, 2912)

like image 158
TT-- Avatar answered Oct 19 '22 23:10

TT--