Reputation: 626
I'm using Git. I made some changes to a branch that I created and then I committed some changes. But now, when I try to commit code, I get the following message:
Warning: not all local changes may be shown due to an error: The string 'HEAD' does not represent a revision number.
Also, when I look into the local changes list in IntelliJ IDEA 12.1.6 the following message appears below the list:
Error updating changes: The string 'HEAD' does not represent a revision number
I would love to get some help on this. I googled the problem but didn't get anything pointing me on the right direction.
Upvotes: 27
Views: 7625
Reputation: 2252
I solved this problem by using git bash command: git reset
and then Invalidate Caches/Restart Intellij.
Upvotes: 0
Reputation: 2004
I was also facing this issue.There seemed to be some issue with my Intellij(2016.3) +git version(2.16.2) that was installed on my machine. I upgraded to Intellij 2018.3 and it works now.My team mates got it resolved it even by upgrading to 2016.3.8(that actaully downgraded git to 1.95.5!)
Upvotes: 0
Reputation: 15855
I had this same issue. For me simply quitting IntelliJ and re-opening it solved the problem.
Upvotes: 66
Reputation: 658
I also got this problem and I resolved it by git reset
from git bash.
Upvotes: 14