Intellij Annotate Option Grayed Out

2019-04-03 08:10发布

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 numbers on the file but when I get the context menu the annotate option is grayed out. What setting am I missing?

I looked at this page and couldn't find an answer. What am I missing?

9条回答
相关推荐>>
2楼-- · 2019-04-03 08:51

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.

查看更多
我想做一个坏孩纸
3楼-- · 2019-04-03 08:54

The answer by @activedecay let me in the right direction. In my case, I have a multi-module project - each has a separate git repo - but we're all in the same workspace.

In my case, Intellij IDEA 2017.2, the Preferences -> Version Control panel shows a listing of all the project roots. The module with the disabled "Annotate" option was in the "Unregistered Roots" section.

To fix the problem, I selected the module and pressed the "+" icon in the lower toolbar to register the module root with Intellij VCS. The change is immediate and the "Annotate" options becomes available.

查看更多
贪生不怕死
4楼-- · 2019-04-03 08:55
  1. Make sure the file is tracked by version control
  2. Add the project to "Version Control" settings version control settings
查看更多
登录 后发表回答