Skip to main content
Git FAQ
Frequently asked questions around Git and Version Control.
Git FAQ featured image

How to Fork a Repository on GitHub

What Is a Fork in Git?

A fork is a server-side copy of a repository hosted on GitHub under your own account. Unlike a clone (which is a local copy on your machine), a fork lives on GitHub's servers — and you have full write access to it.

Original repo (upstream)
github.com/owner/project
        │
        │  Fork (click button)
        ▼
Your fork
github.com/you/project   ←── you have full write access
        │
        │  git clone
        ▼
Local copy (your machine)

Why isn't there a git fork command?

Fork is a platform feature, not a Git operation. GitHub, GitLab, and Bitbucket all offer forking as a built-in action, but Git itself has no fork command. When you fork on GitHub, the platform creates a new remote repository that you own. From Git's perspective, it's just another remote.

How to Fork a Repository on GitHub

To fork a repository, head to its GitHub page and click the Fork button:

GitHub "Fork" Button

A forked copy will then appear in your own list of repositories. The small text below the repository name confirms it is a fork.

GitHub "Fork" Button

That's it. You now have your own copy to experiment with freely, without affecting the original project.

Fork vs Clone — What's the Difference?

Fork Clone
Where it lives GitHub servers (your account) Your local machine
Connection to original Linked — can sync and submit PRs Synced via remote
Write access needed? No — anyone can fork a public repo No to clone; yes to push
Use case Contributing to projects you don't own Working on repos you have access to
Git command No native Git command (gh repo fork via GitHub CLI) git clone <url>

While both create copies of a repository, they serve different purposes: a fork is a server-side copy that stays linked to the original — you can sync it with upstream changes and submit pull requests — while a clone is a local copy on your machine. This makes forking the right choice when you want to contribute to a project you don't have write access to.

The Git Cheat Sheet

No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!


After Forking: Working Locally

Once you've forked a repository, the typical next steps are to clone it to your machine and add the original as a second remote:

# Step 1: Clone your fork locally
git clone https://github.com/your-username/project.git

# Step 2: Add the original repo as "upstream"
git remote add upstream https://github.com/original-owner/project.git

# Step 3: Verify your remotes
git remote -v
# origin    https://github.com/your-username/project.git (fetch)
# origin    https://github.com/your-username/project.git (push)
# upstream  https://github.com/original-owner/project.git (fetch)
# upstream  https://github.com/original-owner/project.git (push)
  • origin — your fork (you have write access)
  • upstream — the original repository (typically read-only for you)

For a full guide on keeping your fork in sync with the original, see our article on adding the upstream remote.

Why Fork a Repository?

Forking is the standard way to contribute to open-source projects. If you'd like to contribute to a repository you don't have write access to, you fork it, make your changes, and then open a Pull Request to submit your work for review. The project maintainer can then accept or reject your changes.

Forks can also become the foundation for entirely new projects. Many popular projects started as forks — Ubuntu, for instance, originated as a fork of Debian.

Common Forking Issues

"You cannot fork this repository" / "Cannot fork because you own this repository"
GitHub prevents you from forking a repository you already own into the same account. If you need a copy, you can fork it into an organization account by clicking the Fork button and selecting the organization from the dropdown.

"Fork button is missing"
Some repositories have forking disabled by the owner (Settings → General → "Allow forking"). If you don't see the Fork button, the repository owner has turned it off.

"Fork button is greyed out"
This typically happens when the repository is archived or when you are not logged in.

Learn More

About Us

As the makers of Tower, the best Git client for Mac and Windows, we help over 100,000 users in companies like Apple, Google, Amazon, Twitter, and Ebay get the most out of Git.

Just like with Tower, our mission with this platform is to help people become better professionals.

That's why we provide our guides, videos, and cheat sheets (about version control with Git and lots of other topics) for free.