Every now and again one of my git repos will show "cherry-or-revert" instead of showing the status. It also doesn't show the commit number like it normally does.
I've tried doing a git reset --hard but that doesn't seem to work. The only way to sort it seems to be recloning the repository - but that seems a bit extreme.
Any ideas how to sort it?

Yes, the commit hash is not displayed if we trigger VCS_INFO's action formats. This is one thing.
The other thing is how this action formats are triggered. This is not under our control.. It seems to happen, if there exists a .git/sequencer folder in your repository (source). I think this happens, if you do something with multiple commits (like a cherry-pick or revert).
Ah, ok. Thanks for pointing me in the right direction.
What was it then? I am curious.
As you said, there was a .git/sequencer directory. I just removed it and everything went back to normal.
Ah. Okay. I thought you had the root cause for the problem. The sequencer directory must be created by some command you execute..
I ran into the same issue. From:
http://stackoverflow.com/questions/39620717/what-is-the-git-sequencer-directory
running
git revert --quit
fixed my issue.
Thanks for sharing your insights @patcheng ! Much appreciated! :)
Same will happen if you tried to cherry-pick a range of commits, and for some reason it failed.
You should either:
git cherry-pick --continue
if you want to keep on cherry-picking, or:
git cherry-pick --quit
to give an end, once and for all..
git cherry-pick --quit solved it for me. No idea these were lingering…
Ah, yeah - git commands that enter iterative states can be tricky. Thanks for sharing, @demetrios!
Most helpful comment
I ran into the same issue. From:
http://stackoverflow.com/questions/39620717/what-is-the-git-sequencer-directory
running
fixed my issue.