如何在PhpStorm中启用git注释 [英] How to enable git annotations in PhpStorm

查看:512
本文介绍了如何在PhpStorm中启用git注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个愚蠢的问题,但是我一辈子都无法弄清楚如何在PhpStorm中启用git注释.通常,您只需右键单击行号装订线,然后选择Annotate即可显示有关谁提交了该代码,何时提交了该代码以及在github上指向该提交的链接的信息.但是,当我右键单击时,Annotate按钮为灰色且不可单击.

This is a silly problem, but I can't for the life of me figure out how to enable git annotations within PhpStorm. Normally you can just right click the line number gutter and select Annotate which displays information about who committed that code, when it was committed, and links to the commit on github. However, when I right click, the Annotate button is gray and not clickable.

我确实在PhpStorm首选项中同时设置了git和github:

I do have both git and github set up within my PhpStorm preferences:

某处可能还有其他设置,但是我一直在寻找,但找不到.

There's probably another setting in there somewhere, but I've been looking and I can't find it.

有人知道如何使那些git注释起作用吗?

Anybody know how to get those git annotations working?

推荐答案

版本控制集成:

  1. 在菜单栏中单击VCS
  2. 点击启用版本控制集成...

  1. 从下拉列表中选择Git,然后按OK(确定)按钮.

删除版本控制集成:

  1. 转到设置"(在Windows中为Alt + Ctrl + S).
  2. 在Version Control中,您可以删除Integrated VCS.

这篇关于如何在PhpStorm中启用git注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆