Github sets git global user.email to repo's local user.email #2628
Description
Description
I use git at work where the global ~/.gitconfig
has a user.email
of, let's say, [email protected].
I also use a personal github repo with all my dotfiles where all commits need a user.email
of, let's say [email protected]. I have set the /repo/.git/config
in this repo to a user.email
of [email protected].
I find when I open this repo in atom, with github enabled, it resets my global user.email
to [email protected], which is a huge inconvenience since I have to manually change it back every time I open this local repo.
When github is disabled, this doesn't happen.
Steps to Reproduce
- Set your global
user.email
to one email address withgit config --global user.email [email protected]
- Set the local
user.email
to a different email address when the working dir is that repo withgit config user.email [email protected]
- Open the repo with
atom .
- View your global .gitconfig with
less ~/.gitconfig
— the user.email will now be [email protected].
Expected behavior:
There should be no change to the global .gitconfig, regardless of what the repo's git config is set to
Actual behavior:
Global git config user.email is changed
Reproduces how often:
100%
Versions
github 0.36.2
Atom : 1.54.0
Electron: 6.1.12
Chrome : 76.0.3809.146
Node : 12.4.0
apm 2.5.2
npm 6.14.8
node 12.4.0 x64
atom 1.54.0
python 2.7.15
git 2.29.2
macOS 10.15.7