Git only tracks file versions, so while you can fork a repo and keep the history, it won’t transfer over all of the past and present issues, packages, settings, and everything else that makes Github great. You’ll need to do a full transfer to a new account.
How Does Transferring a Repository Work?
Organizations are basically teams of people in Github. Anyone with access to the organization will have permissions across all of the org’s repositories.
But, because it works like a new user, you’ll need to transfer existing repositories to the organization. This process works the same way if you’re moving the repo to another user account. You’ll simply need to enter the name of the account or organization that will recieve control of the repo. It will immediately be transferred to be under their name and accessible from their account.
While you’ll maintain all the repo information, you may lose out on features if the recieving user/organization is using a lower tier premium subscription. For example, transferring a repo from a personal account with Github Pro to a free tier organization may cause a loss of access to certain services, so you’ll want to verify that the accounts are in sync.
Also, keep in mind that existing automations can break if they depend on the Github URL, as transferring the repo will put it under a new user account. Github, fortunately, will continue to forward some requests to the old repository, but if you make a new one with the same name it will stop completely.
Transferring a Github Repository
Head over to the repository settings:
Then, under “Danger Zone,” click “Transfer.”
Of course, this is a dangerous process. Make absolutely sure that the username/organization name is 100% correct, as it doesn’t validate the user’s profile before you press the big red button, despite requiring you to type the repo name out to confirm.
Once transferred, the repository should show up immediately, but if you don’t own the organization, you may have to approve the transfer on the other end.