Github: How do I add my own projects to an "organization" account?

GitGithubCollaboration

Git Problem Overview


I have started collaborating on a series of projects with several developers on github, and we recently created an organization with it's own "organization" type account on github. I see that I can fork repositories of my collaborators into the organization account using the usual fork menu, but of course I cannot fork my own account.

What is the expected workflow to import my existing repositories into the organizational account? (I presume I could fork projects hosted by the other members, but not my own?)

Git Solutions


Solution 1 - Git

  • Navigate to the Settings tab of your repository:

enter image description here

  • Scroll down to the Danger Zone and click Transfer:

enter image description here

  • After reading the warnings, provide the name of the repository that you want to transfer and the specific organisation that the repository is going to be transferred to and click I understand, transfer this repository:

enter image description here

  • Done! You 'll then be notified that you action will take effect in a few minutes:

enter image description here

For more details, you can always refer to the official documentation.

Warning: once this is done, make sure you also update any local repository references using the following command git remote set-url origin <new-origin>.

Solution 2 - Git

In the updated github UI all you need to do is go to your project and click "Fork" and then it will ask you if you want to fork into an organization that you are an admin of.

Way simple, just not easy to find.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioncboettigView Question on Stackoverflow
Solution 1 - GitteobaisView Answer on Stackoverflow
Solution 2 - GitjhildenView Answer on Stackoverflow