Snowcrash
Snowcrash

Reputation: 86317

SourceTree - rebase - Errors During Merge

I'm trying to do something simple like editing the commit message for a previous commit.

Checking git status I have:

nothing to commit, working directory clean

I then click on the commit and do SourceTree > Repository > Interactive Rebase...

but get this dialog box, and a completely blank/empty description area:

enter image description here

Note: I read somewhere that this might be due to FileMerge creating a .orig backup file. However, looking through FileMerge preferences I don't see anything about backup files

Upvotes: 13

Views: 5746

Answers (6)

Efi G
Efi G

Reputation: 997

check if you have on uncommitted files, can happen as a result of auto-generated files that are under version control

Upvotes: 1

TT--
TT--

Reputation: 3205

If you're trying to interactive rebase with SourceTree but you get

Errors during merge

or SourceTree appears to hang upon encountering a merge conflict,

this sounds like behaviour attributable to a identified SourceTree bug. (See https://jira.atlassian.com/browse/SRCTREEWIN-2493 and others ending in 2715, 2912)

A Solution:

  1. Don't click Close on the pop-up message.
  2. Exit SourceTree. For example by right-clicking on the taskbar button and Close from there.
  3. Open SourceTree.
  4. Resolve the conflicts.
  5. (Commit changes.)
  6. Click Actions > Continue Rebase.
  7. (Repeat this procedure as needed for additional conflicts)

Alternatively, perform steps 4 through 7 with another application or the command line. Lately I've been enjoying and recommending "Git Fork" client (https://git-fork.com/)

Upvotes: 0

pkamb
pkamb

Reputation: 35032

Push a remote version of the branch you want to rebase

SourceTree is attempting to present you the local commits that have been made on top of the remote branch.

If the remote branch does not exist, SourceTree doesn't know which commit to use as the "parent" of the rebase.

When you get this extremely unhelpful blank error, the issue is that your current branch does not have a remote. Or perhaps that your local branch is up to date with the remote, and you thus have no commits to rebase.

Push a remote version of your branch at the commit you want to use as the parent of the rebase.

Upvotes: 2

Anton
Anton

Reputation: 450

Try in Terminal:

git rebase --continue

You will see a normal error message.

P.S. git add . solved my issue

Upvotes: 15

primozs
primozs

Reputation: 31

Branch is not tracked:

git branch --set-upstream-to=origin/<your_branch_name>

Upvotes: 2

matt
matt

Reputation: 535890

The problem is that that's not actually how you do an interactive rebase in SourceTree. I know it's a terribly confusing interface... Do not choose Sourcetree > Repository > Interactive Rebase. Rather, Control-click on the parent commit and choose — from the contextual menuRebase children.

Upvotes: 11

Related Questions