rdmueller
rdmueller

Reputation: 11012

github: transfer ownership and fork

I've transfered ownership of one of my github repositories (rdmuller/docToolchain) to an organisation (docToolchain/docToolchain). So far, so good. All old URLs are redirected to the new location. Perfect.

But how do I now fork this repository? I fear that, if I fork it, a fork with the name of the old repository (rdmueller/docToolchain) will be created and the redirect will be broken this way...

how can I avoid this?

Upvotes: 5

Views: 2758

Answers (2)

VonC
VonC

Reputation: 1323553

Since May 2020, Ben Balter (Senior Product Manager working on Community and Safety at @GitHub) mentions in his tweet:

We're beta testing a new GitHub feature that allows you to invite someone to manage your open source projects in the event that you are unable able to do so yourself.

If you'd like early access, reply or DM with your GitHub handle and I can add you.

See "Maintaining ownership continuity of your user account's repositories"

You can invite someone to manage your user owned repositories if you are not able to.

We recommend inviting another GitHub user to be your successor, to manage your user owned repositories if you cannot. As a successor, they will have permission to:

  • Archive your public repositories.
  • Transfer your public repositories to their own user owned account.
  • Transfer your public repositories to an organization where they can create repositories.

Upvotes: 1

rdmueller
rdmueller

Reputation: 11012

So, I guess I found a workaround.

suppose you have a repository

user1/repo1

You now want to transfer ownership to org1 and create a fork of it in your account user1.

The problem is that, if you create this fork directly, there will be again a repo called user1/repo1 and github is not able to redirect URLs to the old repository to org1/repo1

Solution:

  • transfer ownership from user1/repo1 to org1/repo1
  • create a temporary organisation org2
  • fork org1/repo1 to org2/repo1
  • rename org2/repo1 to something like org2/repo1-fork
  • transfer ownership from org2/repo1-fork to user1/repo1-fork

this seems to do the trick.

Upvotes: 3

Related Questions