全局 git 文件位置 linux

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12117957/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 14:26:32  来源:igfitidea点击:

Global git file location linux

gitcentos

提问by Ethan Brown

I am using a Centos I am looking for my global git config file Could anyone let me know where would I find the file?

我正在使用 Centos 我正在寻找我的全局 git 配置文件 谁能告诉我在哪里可以找到该文件?

回答by matias.g.rodriguez

you can also find/edit those configuration files running the commands:

您还可以找到/编辑那些运行命令的配置文件:

git config --global -e
git config --system -e
git config --local -e

回答by Ethan Brown

Typing man git confighas a section called FILES that lists the locations of all the system files. The global Git config file is in ~/.gitconfig, but there's also a "system" config file, that's usually in /etc/gitconfig.

键入man git config有一个名为 FILES 的部分,其中列出了所有系统文件的位置。全局 Git 配置文件~/.gitconfig/etc/gitconfig.