Git 未使用 user.name
Git not using user.name
我以 bob
用户身份通过 SSH 登录到 Linux 系统,并且我有
$ git config --list --show-origin
file:/home/bob/.gitconfig user.name=Robert DaBuilder
file:/home/bob/.gitconfig user.email=robert.dabuilder@buildingsite.com
file:/home/bob/.gitconfig color.ui=auto
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=true
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config core.symlinks=false
当我提交一些东西时,我得到:
$ git commit -m "Add further text"
[master ad1cd5e] Add further text
Author: bob <robert.dabuilder@buildingsite.com>
1 file changed, 2 insertions(+)
所以在 'Author' 字段中,为什么使用我的登录名 bob
而不是 user.name
?
git 使用环境变量 GIT_AUTHOR_NAME
作为主要信息来源,如果未设置则使用配置值。
我以 bob
用户身份通过 SSH 登录到 Linux 系统,并且我有
$ git config --list --show-origin
file:/home/bob/.gitconfig user.name=Robert DaBuilder
file:/home/bob/.gitconfig user.email=robert.dabuilder@buildingsite.com
file:/home/bob/.gitconfig color.ui=auto
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=true
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config core.symlinks=false
当我提交一些东西时,我得到:
$ git commit -m "Add further text"
[master ad1cd5e] Add further text
Author: bob <robert.dabuilder@buildingsite.com>
1 file changed, 2 insertions(+)
所以在 'Author' 字段中,为什么使用我的登录名 bob
而不是 user.name
?
git 使用环境变量 GIT_AUTHOR_NAME
作为主要信息来源,如果未设置则使用配置值。