fork as organization after already forking in github

Ben picture Ben · Jan 26, 2012 · Viewed 9.4k times · Source

Is it possible to 'fork again' in github? I had forked a public repository, but then I became owner of an organization and I'd like to fork the same original repository again (not my fork). However, it seems that in order to choose to fork as an organization you can only do so by clicking on the 'fork' button, which because I had originally forked it, that button now says "your fork" to take me to my original fork, but doesn't let me choose "fork as organization."

Answer

nulltoken picture nulltoken · Jan 26, 2012

How about

  • Deleting your personal repository (making sure you've got a local clone/backup) by going to https://github.com/:your_login/:repo_identifier/admin then clicking the Delete Repository button in the Danger Zone.

enter image description here

  • Browsing to the upstream repository GitHub page (https://github.com/:upstream_login/:repo_identifier) should now display a Fork button.

  • Clicking the Fork button will display a dialog (similar to the one below) requesting if you're willing to fork to your personal area or your organization area.

    enter image description here

  • Once this is done, you can add to your local repository a remote pointing to the newly forked repository in your organization area.

$ git remote add your_organization [email protected]:your_organization/repo_identifier.git

UPDATE:

I may have found a (hackish) way to fulfill your request

  • Make sure you're logged in in GitHub
  • Open a new tab and go to https://github.com/:upstream_login/:repo_identifier/fork
  • This should display a page proposing to fork the upstream repository to your organization area.
  • Click on the button :)

Warning: this rely on an undocumented GitHub feature and this hack may stop working at any time. However, once the fork is created, even if the hack stops working, it is safe to think the fork should remain.

enter image description here