I was troubleshooting why my commits were not showing up in my "activity calendar" on GitHub, and by looking at my commits which were not shown I realized it was using an e-mail address that I had not linked to my account.
However, what I don't get is where it got this e-mail address from. The e-mail it used is related to my internal username at my workplace, and basically has the structure username@user.workplace.com
. I have never used this an e-mail address, I'm not sure if it actually works and I definitely have not provided this anywhere myself.
Running the suggested checks git config --global user.email
and git config user.email
show that the (supposedly) used e-mail address is my usual one which I intend to use. Also running echo $GIT_COMMITTER_EMAIL
and echo $GIT_AUTHOR_EMAIL
show that these are empty; however, trying to set them as suggested here does not work; it just says bash: GIT_*_EMAIL: command not found
.
So it might be obvious to everyone but me, but where exactly does the (incorrect) e-mail address username@user.workplace.com
live and how do I fix it? And why at all is it used in the first place?
Edit: I also get the following message:
Committer: My Name <username@user.workplace.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
The last line just brings to an editor in which I get to edit my most recent commit.