Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git rebase will not continue after a delete/modify conflict

I'm in the middle of a rebase of my master to a stage branch

git checkout stage git rebase master 

At some time I deleted two files then modified the two files according to GIT.

warning: too many files, skipping inexact rename detection CONFLICT (delete/modify): test-recommendation-result.php deleted in HEAD and modified in [Bug] Fix test recommender. Version [Bug] Fix test recommender of test-recommendation-result.php left in tree. CONFLICT (delete/modify): test-recommendation.php deleted in HEAD and modified in [Bug] Fix test recommender. Version [Bug] Fix test recommender of test-recommendation.php left in tree. Failed to merge in the changes. Patch failed at 0015. 

I want to say "Yeah git, go ahead and delete those files" so ....

git rm test-recommendation-result.php git rm test-recommendation.php git rebase --continue 

Git says:

Applying [Bug] Fix test recommender No changes - did you forget to use 'git add', Stupid?  When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". 

I say "Don't call me "Stupid" and just do what I told you to do!"

We are now at a standoff. Who is right and how do I fix this?

like image 748
Clutch Avatar asked Apr 01 '11 16:04

Clutch


People also ask

How do I force git to rebase continue?

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

How do you finish rebasing?

When you're finished making all your changes, you can run git rebase --continue . As before, Git is showing the commit message for you to edit. You can change the text ( "i cant' typ goods" ), save the file, and close the editor. Git will finish the rebase and return you to the terminal.


1 Answers

do git add -A followed by git rebase --continue. This should add all changes - including your removal of the files and then continue.

There is no guarantee that the commit didn't have other files that did not conflict and should be merged. git rebase --skip would lose those files. You don't want that.

like image 170
Adam Dymitruk Avatar answered Sep 24 '22 10:09

Adam Dymitruk