tags:

views:

33

answers:

1

I have an issue when I try to rebase an upstream branch into a topic branch. The workflow is like this:

git checkout upstream
git pull origin upstream
git checkout topic
git rebase upstream

The result looks like this:

First, rewinding head to replay your work on top of it...
Applying Refactored database access and added logging
error: patch failed: path/to/file1.ext:21
error: path/to/file1.ext: patch does not apply
error: path/to/file2.ext:3
error: path/to/file2.ext: patch does not apply
fatal: mode change for path/to/file3.ext, which is not in current HEAD
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.

That happened to me yesterday, and I've done my research and found nothing, so in the end I used git merge upstream instead of git rebase upstream and things worked. The real problem is that the error appears today too. I'm already synchronized with upstream due to yesterday's merge. Also, I've not modified files introduced by my team mates since yesterday.

My Git version is 1.5.6.5 (and don't really feel like updating it on this machine, I'm afraid of the unwanted consequences).

+2  A: 

I have found that rebasing with the --merge option helps in such cases. (Git will do a rebase nonetheless.)

Alexander Groß
Thanks, it seems to solve the issue. Well, I have some conflicts, but that's another story.
Ionuț G. Stan