1
CentOS 6的,Git的2.0.4Git全局配置用户取决于系统帐户?
在服务器上设置的git的另一家开发商,为系统根我所做的:
[email protected] $ git config --global user.name "My Dev Guy"
[email protected] $ su mydevguy
[email protected] $ git config --list
无需用户设置!所以,作为系统用户“mydevguy”我所做的:
[email protected] $ git config --global user.name "Some Other Guy"
[email protected] $ git config --list
节目“其他一些人”作为用户名,符合市场预期。所以我退回到系统root用户,看看有什么。
[email protected] $ exit
[email protected] $ git config --list
它仍然显示“我的开发人员”那里。
我认为这些是全局git设置,但似乎可以为每个系统用户配置git用户。是这样吗?我在哪里可以阅读更多关于此?
我想你可能正在寻找'git config --system'? –
我并不是真的在“寻找”任何东西,但你已经帮我找到了。这太棒了,因为我发现的其他东西似乎都说你在同一台机器上不能有多个git用户,这看起来很荒唐。例如。 http://stackoverflow.com/questions/3860112/multiple-github-accounts-on-the-same-computer –
检查选项[ - 全球, - 系统和 - 本地](https:// www。 kernel.org/pub/software/scm/git/docs/git-config.html)。这些选项明确指定哪些配置文件受到影响。 – user3159253