When I right click on the side and click "Annotate" I get the following error
Error:Failed to annotate: com.intellij.openapi.vcs.VcsException: fatal: no such path app/src/main/java/.. ../MainActivity.java in HEAD during executing git -c core.quotepath=false blame --porcelain -l -t -w HEAD -- app/src/main/java/.. ../MainActivity.java
Google didnt help. I tried cloning the repo again but didnt work. I have no idea whats going on.
Also when I try to look at the history, the console says something like
fatal: no such path .../MainActivity.java in HEAD
I struggled for months with this happening but just for Git submodule code - and in my case the "Oh you renamed your folders" solutions didn't help me at all.
Finally this was the solution for my case:
Version Control
tabThat's it, fixed my annotate and git change highlighting issues.
The OP got it resolved now, but I am answering this for who came across this problem like I just did.
The paths in git repo are case-sensitive. So try to rename your folder in git to match the checkout folder on your system, especially if you are on Mac/Linux. Try run annotate again should work now.
git mv FOO foo2
git mv foo2 foo
git commit -m "Fix case sensitivity"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With