Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Git未使用user.name_Linux_Git_Configuration_Git Commit - Fatal编程技术网

Linux Git未使用user.name

Linux Git未使用user.name,linux,git,configuration,git-commit,Linux,Git,Configuration,Git Commit,我以用户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/c

我以用户
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(+)
$git commit-m“添加更多文本”
[master ad1cd5e]添加更多文本
作者:鲍勃
1个文件已更改,2个插入(+)

那么在“Author”字段中,为什么使用我的登录名
bob
而不是
user.name

git使用环境变量
git\u Author\u name
作为主要信息源,如果未设置,则使用配置值。

谢谢,这帮助我找到了这里的信息。似乎有点不幸的是,
GIT\u AUTHOR\u NAME
覆盖了所有其他设置,但没有显示在
GIT config--list--show origin
中。或者还有另一个命令可以这样做吗?你的意思是同时显示GIT\u AUTHOR\u NAME的值的命令吗?我不知道。