coffeeak
coffeeak

Reputation: 3120

SourceTree keeps using the same old user email even after i changed it

I tried this:

git config --global user.name "XX"
git config --global user.email [email protected]

It still doesn't work! When I try to push in SourceTree, it keeps using my old user profile's email.

Help!!!!!

Upvotes: 1

Views: 3428

Answers (2)

FullStack
FullStack

Reputation: 457

If you have set your global user.name and user.email set then SourceTree is probably using its own. You probably dont have the Use global user setting ticked. In SourceTree press settings (top right) > Advanced > user information and click the Use global user setting. Alternatively you can write in your own in the boxes provided.

Upvotes: 0

Cristian Lupascu
Cristian Lupascu

Reputation: 40526

You probably have user.name and user.email settings in your local repository that override the global ones.

Try running git config user.email to confirm this.

If this is the case, run git config user.email [email protected] (without the --global flag) to configure the correct email in the local repository.

Alternatively, you could also run git config --unset user.email. This will erase the user.email value configured in the current repository, and git will use the global value as the default.

Upvotes: 2

Related Questions