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
If you check File > Settings > Version Control
and see that your current project is listed under "Unregistered Roots", go to (on the menubar) VCS > Enable Version Control Integration
. It will ask you to select the VCS tool you use, then click ok and you'll have all the integrations working (including the annotate feature which uses git blame).
I had the same issue with the Annotate being greyed out however VCS was already set up. Editing the current VCS Directory Mapping fixed the issue for me.
Go to
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 add
ed 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!
Looks like its a fresh project. First configure the Version Control like Git and than commit at least once. After first commit Annotate option will not be grayed out.
Also update git for any new version.
I had exactly the same issue and managed to solve it by updating git. The reason for that is that I have recent InteliJ Idea and an old 2.1.x git installed.
For Mac:
brew upgrade git
brew link git
followed by IDE restart.
Here are the steps i followed : Go to VCS -> Checkout from Version Control -> Git -> give the URL for your repository.
The annotate option will be enabled now.