How long does github forward renamed/moved repos?

Hi!

I’m in a situation where I’d like to move repos from one organization to another (and in some cases rename as well).

I’ve heard Github will automatically forward git requests for the old repo location to the new one (in cloning, etc.). Does anybody know how long the forwarding will happen for or is it permanent?

Thanks for any help anyone can provide.

From this help page: https://help.github.com/articles/transferring-a-repository-owned-by-your-organization/ :

If you create a new repository under your account with the same name as the transferred repository, existing redirects to the transferred repository will break. Instead, use a different name for the new repository.
1 Like

I got a response from Github staff. May help others wondering in the future:

If you do both a transfer and rename, the redirect will still apply.

We keep redirects for moved and renamed repos indefinitely, but new repos take priority over redirects. That means if a new repo is created at an old location, the redirects will break in favor of displaying the new repo, for as long as that new repo exists.

Sounds like its indefinite unless a same-naned repo is created at the old location :slight_smile:

9 Likes

Had the same question today.

While being curious I created a new repo with the old name and then I deleted it. The redirect took place again.