Why is 'git rebase --continue' so difficult?


I'm confused about how merges work. I had a situation today where I tried to rebase my code and it told me I had to manually merge some changes. So I was able to do that in visual Studio 2015. Then I tried saying "git add [myfile]" and that seemed to work. Then I tried "got rebase --continue".

That's when things got confusing. It said: "WebAPI/Controllers/FileUploadController.cs: needs update. You must edit all merged conflicts and then mark them as resolved using git add." <-- But there were no conflicts in FileUploadController.cs. I only removed a reference to System.Web.Http.Cors.

So I said: git add FileUploadController.cs. Seemed to work. Then I said: git rebase --continue. It complained again saying the same thing.

So then I tried undoing my changes to FileUploadController.cs. I said: git rebase --continue. This time it spat out the following error message:

"Applying: fixed unit test
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.

When you have resolved this problem, run 'git rebase --continue'.
If you prefer to skip this patch, run 'git rebase -skip' instead.
To check out the original branch and stop rebasing, run 'git rebase --abort'."

Finally, I said: git rebase --skip, and that seemed to solve the problem.

So my question is: why is continuing rebase so bloody difficult after a merge? Why does it get so confused? There were absolutely no conflicts in FileUploadController.cs. It wouldn't even let me commit my changes to it. What's a guy supposed to do?

3 answers

I'm really dismayed that there are no answers to this HUGE issue. If I do a right-click and "rebase current changes onto master" in Sourcetree, and then have conflicts, there seems to be no way to finish the process in Sourcetree. The only way I can figure it out (if and when I remember) is to resolve the conflicts using my external tool (BeyondCompare) then go to the command line and do "git rebase --continue", then go back into Sourcetree and do a force push of the branch I rebased.

Why doesn't Sourcetree have a visual equivalent of "git rebase --continue"?


I found a good explanation here:


"Here, HEAD is the other branch version, not the one that is checked out."

"The error message is not very intuitive, but it does contain the answer. We just need to tell rebase to skip this patch. It’s also not necessary to fix the conflict markers in the file. You will end up with the file version from the branch you are rebasing on."

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Agile

Managing Projects in Several Jiras at the Same Time

Have you ever noticed that fixing specific problems might be a door opener for a bigger challenge, affecting a wider audience? This was exactly the case when we, as a service company working with mul...

136 views 3 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you