Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove multiple email on git?

Tags:

git

github

I keep getting this error on my git

warning: user.email has multiple values

then i check my user.mail

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

I also check

git config -e

and this is the file :

[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

and i dont have any repository on my local environment . I only have one.

like image 395
uno Avatar asked Nov 22 '25 05:11

uno


1 Answers

You can (instead of manually edit) remove them with:

 git config --global --unset user.mail
 git config --global --unset user.mail

That will removes the first two entries of user.mail.

Then check for any extra emails in:

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)
like image 128
VonC Avatar answered Nov 24 '25 20:11

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!