Search code examples
gitversion-controlcherry-pick

Git cherry-pick fail


I have a local brand new branch and I want to cherry pick some commits. A few picks ran OK but the next one produced a conflict:

>git cherry-pick 676b371
error: could not apply 676b371... fixed connection resolution.
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

So I tried to look what's wrong and got this:

>git status
On branch MyBranch
fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory

What does it mean? My repo is broken? How do I fix that?

Update: ran as suggested:

>git cherry-pick --abort

>git status
On branch MyBranch
fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory

Update2: this is a content of .git/rebase-merge folder:

git-rebase-todo
git-rebase-todo.backup
head-name
interactive
onto
orig-head
quiet

p.s.

git version 2.10.1.windows.1


Solution

  • Found the answer here:

    git rebase --abort
    

    That did the trick.