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:30

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

  • Settings -> Version Control
  • Click on the current entry for your your application listed under projects.
  • Click the pen icon to edit it
  • Hit Ok, then ok to close the main dialog
查看更多
甜甜的少女心
3楼-- · 2019-04-03 08:39

Your VCS is not enabled, hence the issue. Below is the solution for that:

  1. Click on the VCS option in the menu bar
  2. Enable VCS
  3. Select your version control
  4. Done, you should be able to use the annotate option.
查看更多
劳资没心,怎么记你
4楼-- · 2019-04-03 08:39

I the following two screen short will solve your problem: 1. enter image description here

  1. enter image description here

I hope after those steps you will be able to see who changed a line.

查看更多
beautiful°
5楼-- · 2019-04-03 08:40

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.

查看更多
一夜七次
6楼-- · 2019-04-03 08:44

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.

查看更多
仙女界的扛把子
7楼-- · 2019-04-03 08:49

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).

查看更多
登录 后发表回答