Git rebase does not continue after resolving conflicts

I ran git rebase origin/[branch] on a branch, which is the result of merging several local branches together at design time. As expected, I ran into some conflicts and started to fix them. The first few were beautiful. Git lists the files, I cleaned them up, made a corresponding git add [file] for each of them, and then did git rebase --continue on it git rebase --continue .

But now I hit a patch that conflicts and clears, but for some reason I cannot continue. I cleared the files and they are all delivered, but when I git rebase --continue , I get:

 $ git rebase --continue You must edit all merge conflicts and then mark them as resolved using git add 

I know that the fact associated with this post deletes a file that was later added and changed. But when I git status , all I see is:

 $ git status # Not currently on any branch. # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: [file 1] # modified: [file 2] # modified: [file 3] # 

A file that has been deleted is not displayed.

Therefore, there are no files that need to be changed, but Git insists that I still need to do something else before I can continue on my way.

+4
source share
2 answers

I figured out this problem and put it here if someone else comes across it:

I noticed that the file that I thought was deleted in this commit was still in the file system and was still tracked by git. So I did git rm [file] and got the following message:

 $ git rm [file one] [file two]: needs merge rm '[file one]' 

When I checked [file two] pretty sure that it was still in a conflicting state and should have been fixed. After fixing and setting, I was able to git rebase --continue . I'm still not sure why the deleted file did not show as deleted or why this file did not show, because it needs to be fixed when git status executed.

+4
source

You can try git ls-files -u so that the list of git files is considered not merged.

0
source

Source: https://habr.com/ru/post/1396117/


All Articles