Commit linking to account

Hello!

I am looking to switch my username, but am concerned that I run the risk of potentially losing (and unverifying) a lot of commits if I do so (I use a github ID email for committing, and for GPG key signing).

I would like to know if I can change my username and still be able to use my previous information for signing/committing, if there’s a redirection, or if I just have to stick with what I have.

there is the usual name for you, (in my case, I did not put anything), if you are familiar with Twitter, this is the name that you can change anytime,

there is the handle, the one in your URL, mine is xdvrx1, compared to Twitter, it’s the handle also, which is your identity
image

commits are associated with your email, not the username or handle, if you change your handle the only problem is that, all of your previous links will not work anymore and you need to update that manually

I tested that in the past just to know also, I changed my email twice also just to know the effect

If you’re using the username+number thing, I’d expect those to be moderately orphaned. If you use the username@users.noreply.github.com then instead of being just orphaned, I’d expect them to be available for capture by the next user claiming the handle.

It’s probably technically possible for github to handle the +number flavor, but I imagine there are reasons for them not doing so.

The documentation says commits with ID-style noreply address will continue to be recognized, ones with the old username only won’t: Changing your GitHub username - GitHub Docs

I don’t see anything about GPG signatures there. My guess is that if the “mail address” is still recognized as yours having a matching key on your account should work, but it’s up to you if you want to risk trying it out. :sweat_smile:

1 Like