If you have access to a private repository and the owner permits forking, you can fork the repository to your personal account, or to an organization on GitHub Team where you have permission to create repositories. You can fork any public repository to your personal account, or to an organization where you have permission to create repositories. For more information, see " Understanding connections between repositories." About creating forks You can view, sort, and filter the forks of a repository on the repository's forks page. For more information, see " Restoring a deleted repository." If you delete a private repository, all forks of the repository are deleted.
After a fork is deleted, you cannot restore the fork. For example, you can add collaborators, rename files, or generate GitHub Pages on the fork without affecting the upstream. You can make any changes you want to your fork, and there will be no effect on the upstream. For more information, see " Allowing changes to a pull request branch created from a fork."ĭeleting a fork will not delete the original upstream repository. You cannot give push permissions to a fork owned by an organization. This speeds up collaboration by allowing repository maintainers to make commits or run tests locally to your pull request branch from a user-owned fork before merging. If you fork a public repository to your personal account, make changes, then open a pull request to propose your changes to the upstream repository, you can give anyone with push access to the upstream repository permission to push changes to your pull request branch (including deleting the branch). In open source projects, forks are often used to iterate on ideas or changes before incorporating the changes into the upstream repository. When you view a forked repository on GitHub, the upstream repository is indicated below the name of the fork.
A fork can be owned by either a personal account or an organization. After you fork a repository, you can fetch updates from the upstream repository to keep your fork up to date, and you can propose changes from your fork to the upstream repository with pull requests.
Forks let you make changes to a project without affecting the original repository, also known as the "upstream" repository.