Global git config Intellij

不问归期 提交于 2021-01-29 09:35:16

问题


I am using the latest version of Intellij IDEA 2019.3 on Ubuntu 18.04 and whenever I create a new project I have to add a local git config because Intellij cannot find the global config. From the IDEA terminal git can read my global git settings but IDEA VCS can't.


回答1:


IntelliJ does not have builtin git and thus is not looking for configs itself - it just issues commands to the command-line git client, and git itself reads the configs as needed and applies them.

The only reason for git to see a config when started manually, but not see when started by the IDE could be environmental differences - e.g. if you have some environment variable altering gitconfig (e.g. $GIT_CONFIG or $XDG_CONFIG_HOME), which was set in the current tty, but is not available in the IDE context.

Using the default global config file ~/.gitconfig should always work though



来源:https://stackoverflow.com/questions/60998830/global-git-config-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!