Git的IntelliJ IDEA记住作者 [英] IntelliJ IDEA with Git remember author

查看:336
本文介绍了Git的IntelliJ IDEA记住作者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将IntelliJ与Git项目一起使用,并正确设置了user.nameuser.email.问题是使用IDE界面提交时,默认情况下未选择作者.我可以单击并获得一个下拉列表来选择它,但是有时我忘记这样做了,每次忘记该提交都会很痛苦.

I'm using IntelliJ with a Git project, and have setup my user.name and user.email properly. The problem is when committing using the IDE interface the author is not selected by default. I can click and I get a dropdown to select it, but sometimes I forget to do that, and it's a pain to ammend the commit each time I forget.

因为只有一个作者,有没有一种方法可以自动将作者设置为提交状态?

Is there a way to set the author automatically on commit, since it's only one, and it would save me some headaches?

推荐答案

IntelliJ IDEA不会在

IntelliJ IDEA doesn't pre-select author in the combobox which is a known cosmetic issue, however it should use the author defined in the git configuration by default.

请仔细检查全局git配置中是否正确指定了user.nameuser.email.

Please double check that user.name and user.email is specified properly in the global git configuration.

一些用户在使用cygwin git时提到了一个问题,当IDEA可能找不到全局git配置时.在这种情况下,如果您为本地项目配置指定用户,则可能会有所帮助:

Some users mentioned a problem when using cygwin git, when IDEA probably cannot find the global git config. In this case it may help if you specify the user for the local project configuration:

git config --local user.name "John Doe"
git config --local user.email john@doe.com

这篇关于Git的IntelliJ IDEA记住作者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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