我在 git 上不断收到这个错误
warning: user.email has multiple values
然后我检查我的 user.mail
git config --get-all user.mail
juanlazy21@gmail.com
juanlazy21@gmail.com
juanlazy21@gmail.com
我也检查
git config -e
这是文件:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = https://github.com/cloudy/coding.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "resolutions"]
remote = origin
merge = refs/heads/resolutions
而且我的本地环境中没有任何存储库。我只有一个。
最佳答案
您可以(而不是手动编辑)删除它们:
git config --global --unset user.mail
git config --global --unset user.mail
这将删除 user.mail
的前两个条目。
然后检查是否有任何额外的电子邮件:
git config --get-all user.email # (local repo git config file)
git config --global --get-all user.email # (user config file)
git config --system --get-all user.email # (system git config file)
关于git - 如何删除git上的多个电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38258816/