gpt4 book ai didi

Git 提交作者信息 - Christian S. 到底是谁?

转载 作者:太空狗 更新时间:2023-10-29 13:56:55 24 4
gpt4 key购买 nike

我最近开始使用 git。我尝试按照设置用户信息的说明进行操作,但似乎出现了严重错误:

[test@h] git config --list
user.name=**MY NAME**
user.email=**MY EMAIL**
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=** URL **
branch.master.remote=origin
ranch.master.merge=refs/heads/master

到目前为止,还不错。我的姓名和电子邮件地址似乎设置正确

[test@h] git add somefile

我添加了一个文件,现在要提交它:

[test@h] git commit -m "test commit"     
[master 280efe4] test commit
Author: Christian S. <strcat@****.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 somefile

突然不知从哪里冒出来...Christian S.

我忽略了什么?我不知道这个名字和电子邮件地址从何而来。这是我忘记在某处覆盖的一些默认值吗?

编辑:删除个人信息

最佳答案

好的,感谢 pst,我找到了解决方案。我在一个开发服务器上工作,其中有一个系统范围的 .zshrc 文件。

显然 .zshrc 文件的来源是:http://www.strcat.de/dotfiles/dot.zshexports

在这个文件中,作者的姓名和电子邮件地址是硬编码的:

if [[ -x `which git` ]]; then
(( ${+GIT_AUTHOR_EMAIL} )) || export GIT_AUTHOR_EMAIL = "..."
...

关于Git 提交作者信息 - Christian S. 到底是谁?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10749211/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com