How to Remove Github Repository Redirects Across Name Changes

Alex Hong
2 min readOct 2, 2017


A while back, I switched Github usernames so that I could have a formal username that wasn’t associated with my regular games/Reddit username. However I realized after switching even though my old profile was “deleted”, the repository links were not. Let me give an example.

Let’s say your username is old_user, and you profile was You switched to a new username, new_user, and your new profile was Any old repository you had (i.e. would redirect to your new repository ( Even if you later change your new repository name to repo2, the original link would still redirect to your new repository with the new name.

Obviously this was an issue because I wanted to minimize the links between my games/Reddit profile to my real name. I first attempted to get in contact with Github support, but was given the following response:

Hi there, ~!

This behavior is to be expected. This guide explains what happens when you change your username on GitHub:

I’m afraid there is nothing we can do to fix this!

Well, that’s not very helpful. According to Github, these links are permanently in place, and cannot be redacted in any normal fashion.

The solution I tried was thus overriding the link entirely. I created another Github profile named old_user, and created another repository with the same name repo1, so didn’t redirect at all. Hooray, it worked!

My only issue with that was the repository name I had was fairly obscure, so if you looked it up on Google, you could still link it to my actual profile. I wanted 100% separation, so I made one last change.

By changing the name of repo1 on old_user’s account to something completely different, like unicorns, would now only redirect to The only last thing you would have to do is request a removal of Google’s cache through their website here.

One thing to note is that despite all this, if you delete this new unicorns repository for whatever reason, will once again redirect to or whatever name you change repo1 to. These redirects are really persistent!

*Note that all of the usernames and repositories are examples only and do not actually exist as of this writing.



Alex Hong

Developer Relations Engineer @ Google Cloud