Search code examples
gitgit-config

git config username and email set to blank automatically


I'm having some problems with my global git config. Both username and email is set to blank automatically. I can't figure out if there is a pattern to this behaviour, but more often than not git tells me to set username and email when I'm trying to make a commit. Updating using git config --global or directly editing my .gitconfig file both works, but after some time they disappear again.

File content before reset:

[user]
    name = <name>
    email = <email>
[core]
    editor = atom --wait
    excludesfile = /Users/christian/.gitignore_global
[pull]
    rebase = false

File content after reset:

[user]
    name = 
    email = 
[core]
    editor = atom --wait
    excludesfile = /Users/christian/.gitignore_global
[pull]
    rebase = false

Solution

  • As confirmed by Isaac Betesh this is an Atom problem, where some interactions with tabs from different repositories wipe out the global user/email config. The issue is at: https://github.com/atom/github/issues/2558

    I've temporarily worked around the problem by removing the write permission from ~/.gitconfig