2016-07-08 160 views
1

我一直让我的混帐此错误如何删除git上的多个电子邮件?

警告:user.email有多个值

然后我检查我user.mail

git config --get-all user.mail 
[email protected] 
[email protected] 
[email protected] 

我还检查

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 

我没有任何存储库在我的本地环境。我只有一个。

+1

'混帐配置--global --edit' –

回答

0

可以(而不是手动编辑)与删除:

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)