Intellij Annotate Option Grayed Out

后端 未结 11 1185
谎友^
谎友^ 2021-02-05 00:48

I am trying to look at who changed a line in Intellij 15. I know I can use git blame but I want to learn how to do it correctly in intellij. I am right clicking on the line numb

11条回答
  •  囚心锁ツ
    2021-02-05 00:58

    I had the same issue, but my VCS settings were all configured properly. It turns out that git itself was considering the file as a brand new file and therefore didn't have any history for it. The file was actually not new, but simply renamed. While my rename changes were unstaged, git understood it as two separate files: a deletion of the old file and creation of a new file. However, once I git added the "deleted" file and the "new" file, git understood that it was actually a rename and IntelliJ was able to annotate on the file as expected.

    I'm not sure why git didn't understand the rename when it was unstaged, but hopefully this helps someone!

提交回复
热议问题