Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To fork a repository on GitHub.com, open the repository, select Fork, choose where to create your copy, set its name and branch options, then select Create fork. A fork is a separate repository connected to the original (the “upstream” repository), so you can work on your copy without writing directly to the original.

Fork a repository on GitHub.com

  1. Open the repository you want to copy on GitHub.com.

  2. Select Fork near the top-right of the repository page.

  3. Under Owner, choose your personal account or an organization where you are allowed to create repositories.

    Free tools Windows power users keep installed

    One-click scans. No signup required.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Keep the suggested repository name or enter a different one. You can also edit the description.

  5. Choose whether to copy only the default branch. Select Copy the DEFAULT branch only for that option; leave it unselected to copy all branches.

  6. Select Create fork. GitHub creates the fork under the owner you chose.

Copying only the default branch is sufficient for many contribution workflows. Copy all branches if you need to work with other branches from the source repository. GitHub’s fork instructions describe the form and branch option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check access, destination, and visibility first

For a public repository, you can generally fork to your personal account or to an organization where you have permission to create repositories. Forking a private repository requires access to it and permission from its owner. Private forks cannot be created in an organization on GitHub Free; an organization using GitHub Team must allow you to create repositories. Organization or enterprise policy can add further restrictions. See GitHub’s repository forking guidance for access and destination requirements.

A fork’s visibility follows the upstream repository: a public repository produces a public fork, and a private repository produces a private fork. You cannot independently change the fork’s visibility. Repository, organization, and enterprise policies may also restrict whether forking is allowed. GitHub documents the forking-policy controls.

Choose a way to create the fork

GitHub CLI

With Git and GitHub CLI set up and authenticated, run:

gh repo fork REPOSITORY

Replace REPOSITORY with the repository identifier. To create the fork under an organization, specify its name:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
gh repo fork REPOSITORY --org ORGANIZATION

Replace ORGANIZATION with the destination organization. The CLI may prompt you for additional choices. See the GitHub CLI command reference.

GitHub Desktop

If you clone a repository that you cannot write to and then try to push a change from GitHub Desktop, Desktop can offer to create a fork for you. This is useful when you start with a local clone and discover that you need your own remote repository. See GitHub Desktop’s cloning and forking instructions.

What a fork changes—and what it does not

A fork is a separate repository that begins as a copy of another repository and remains connected to it. It has its own settings and permissions. You can manage work such as branches, issues, pull requests, Actions, projects, and labels in the fork, subject to its settings and your access. A branch is different: it is a line of work inside one repository, not a separate repository. GitHub’s explanation of forks covers the relationship to the upstream repository.

Forks belong to a repository network. An upstream repository’s owners can read forks in that network, so do not assume that a public fork is private from the upstream owner. Public fork owners control access to their own fork, but repository-network relationships still matter. For private forks, permissions follow GitHub’s rules for the upstream and fork; if your access to the private source is revoked, your private fork may be deleted while a local clone remains. Review GitHub’s fork permissions and visibility details before using forks for sensitive work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For private-repository pull requests from forks, Actions behavior depends on repository settings and policy. Those controls can determine whether workflows run, whether tokens have write access, whether secrets are provided, and whether a run needs approval. Do not assume a fork pull request receives the same workflow permissions as work in the upstream repository. See GitHub’s Actions settings guide.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep a contribution fork in sync with upstream

Forking creates your copy; it does not automatically keep that copy current with later changes in the original repository. For a contribution workflow, clone your fork locally and regularly sync it with upstream so your work is based on recent changes. GitHub’s fork guide explains the available syncing workflow: syncing a fork.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.