GitHub issue - My commits under two different names

GitHub issue - My commits under two different names

Talia

Member
Local time
21:56
Joined
Jan 21, 2020
Messages
84

I am a fairly inexperienced user of Git and GitHub. Originally, I used GitHub Desktop (a GUI) for everything, and I still do for the most part, but a little bit ago I took a Git course and as such used the command line. While I was doing that, they taught you how to set your name (user.name) in Git, and I think that as a result of that, commits are now under my full name, Talia DeGisi, instead of my GitHub username, talia-storymaker (even though I'm now using GitHub Desktop again). I don't care about my full name being known or anything like that, but it is very frustrating that now my commits are not in one "place" and a lot of my commits are not under a "real" user. For an example see here: talia-storymaker/sonic-vs

I am very frustrated by this. I need to fix this both for the future and hopefully I can also change it so my past commits will also be by my username. I may be able to figure out the former by myself, but I don't know about the latter. I found some answers to this issue on Stack Overflow and GitHub Help, but I still feel a bit nervous about rewriting my repository history. Is this something I should go ahead with?

 

Talia

Member
Local time
21:56
Joined
Jan 21, 2020
Messages
84

I believe those links are generated by user.email rather than user.name. So if you set your email in Git to one linked with your GitHub account it should return back to being linked with your username (I think!). Bare in mind this won't have an effect on old commits. 😊
That did the trick. Thank you! :)

BTW, while it may not have changed old commits, while I was doing this, I updated my email address in GitHub to my current one and made it no longer private (to remove any potential complications), and this seems to have caused my previous commits to be associated to my account to some extent, because now my GitHub profile is recognizing them in my history. So that's very nice, especially since that's part of why I was bothered to begin with.

 
Last edited:

Gummibeer

Astroneer
Moderator
Local time
04:56
Joined
Oct 5, 2019
Messages
1,169
Pronouns
he/him

Hey,
Adam is right that the email is used as identifier. That's why others can commit in your name as long as you don't sign them.
Old commits are assigned to your account if you add the email used in those commits to you account. I have ~10 emails in my one (old, personal, project, companies ...).
You don't have to make the email public. The commits are assigned to your account independent if your account mail is public or not.
Sometimes the GitHub UI has some caching issues. So press a lot of F5 and give them.some time should solve this issue.
We've moved from bitbucket to GitHub yesterday and I had to add my company email - after 1h all my commits were assigned to my account.

 

Gummibeer

Astroneer
Moderator
Local time
04:56
Joined
Oct 5, 2019
Messages
1,169
Pronouns
he/him

Here's how I setup my git on a new machine:

 
Last edited:
Top