aut*_*tix 4 git global system git-config
如何查找/列出全局和用户配置文件?我的意思是“Git 原生功能”,而不是像find.
在这个问题中,注释指示如何知道哪个文件与--system,--global和--local.
简而言之,你只是--edit用来git config:
git config --system --edit
git config --global --edit
git config --local --edit
Run Code Online (Sandbox Code Playgroud)
如果你EDITOR用 eg替换环境变量,echo你可以在一个变量中接收它,即。您可以以编程方式使用它:
t=`EDITOR=echo git config --system --edit`
echo $t
Run Code Online (Sandbox Code Playgroud)
/etc/gitconfig在我的情况下打印。