Any GitHub repository can be transferred between users or organizations. Transferring a repository gives the new user immediate administrative access to the repository—including its code, issues, and pull requests. The repository's new owner will receive an email before the transfer is complete, giving that user the option to accept or reject the transfer within a day. If the new user doesn't reply to this email, the transfer won't complete.
Warning: Forking a repository is NOT the same as transferring it. Forking just creates a copy of the original repository.
When you transfer a repository, its issues, wiki, stars, and watchers are also transferred. In addition:
- If the transferred repository is a fork, then it remains associated with the upstream repository.
- If the transferred repository contains a GitHub Pages site, then links to the Git repository on the Web and through Git activity are redirected. However, we don't redirect GitHub Pages associated with the repository.
- If the transferred repository contains webhooks or services, then those webhooks and services remain associated after the transfer is complete.
If you transfer a repository from a user account to an organization, issue assignees are refreshed so that only owners are left assigned to issues. Also, if you transfer a repository from an organization to a user account, the issue assignee can only be the user to whom the repository would be transferred.
When a repository is transferred between two user accounts, issue assignments are left intact.
Before you transfer a repository, keep these things in mind:
- The target account must not have a repository with the same name, or a fork in the same network.
- If the repository is private, the target account must have a paid account with at least one unused private repository available.
- Private forks can't be transferred, only root private repositories.
- Open the repository's page on GitHub
- Select "Settings" from the repository action bar
- Click "Transfer"
- Read the warnings and heed them well. Enter the repository name to confirm that you've done this.
- Enter the name of the new owner and click "I understand, transfer this repo"
Only users with admin or owner access to an organization's repository can transfer the repository out of the organization. On the other end, the person transferring the repository also needs to have admin rights in the receiving organization. A repository transferred to an organization is only visible to the owners team.
You can arrange this by asking the receiving organization to create a team with admin privileges with no repositories in it.
Users must have admin or owner access to a repository before they can transfer it out of the organization. If the user does not have this access, a temporary admin team can be created with only the user and repository in it. The user receiving the repository is the only one who can perform the transfer.
Users must have admin or owner rights within the receiving organization before they can transfer a repository that they individually own. If the user does not already have this level of access, a temporary admin team can be created with only the user. The user sending the repository is the only one who can perform the transfer.
Just as when transferring a repository between two organizations, a repository transferred from a user to an organization is only visible to the owners team.
When a repository is transferred, all requests to the previous location are automatically redirected to the new location. External links should continue to function.
In addition to redirecting web traffic, all
git fetch, or
git push operations targeting the previous location will continue to function as if made on the new location. However, this can be somewhat confusing, so we strongly recommend updating any existing local clones to point to the new repository URL:
git remote set-url remote_name new_url
remote_name will be
origin. For more information, see "Changing a Remote's URL".