# What is a fork in GitHub and when to use it instead of a clone

> A fork is your own copy of a repo. How to fork, how it differs from clone and branch, and what it shows to others.

Source: https://gitwow.org/blog/what-is-a-fork-in-github | Updated: 2026-11-21

## Key takeaways

- A fork is a separate repository on GitHub. A clone is a copy on your computer. A branch lives inside one repository.
- Fork when you cannot push to the project or want to build your own version of it.
- A fork is a snapshot. Sync it with upstream before each new piece of work.
- Forking is not anonymous: the original's fork count goes up and your account appears in its list of forks.

We have worked with social networks for more than 10 years, and one habit from that work applies here: every public action leaves a trace that someone reads. Forking is the clearest case on GitHub, because it is both a working tool for developers and a public signal of interest. This article covers the tool first and the trace second.

## A fork is your own copy of someone else's repository

GitHub's documentation defines forks as repositories that start as copies of another repository, called the upstream repository. A fork has its own settings and permissions but stays connected to upstream. Open one and you will see the original named under the fork's title.

Two reasons to fork cover most cases. You want to fix or add something in a project where you have no write access, or you want to start your own version of a project and keep its history. Both start with the same button, and neither touches the original until you send a pull request.

## Fork vs clone vs branch: pick by what you need to change

| | Fork | Clone | Branch |
| --- | --- | --- | --- |
| Where it lives | GitHub, in your account | Your computer | Inside one repository |
| Needs write access to the original | No | No, but you cannot push without it | Yes |
| Has its own issues, pull requests and Actions | Yes | No, it is only files | No, it shares the repository's |
| Best for | Contributing to or building on a project that is not yours | Reading or working on code locally | Team work in a repository you can push to |

GitHub's documentation puts the difference in one line: a branch is part of one repository, and a fork is a separate repository with its own settings and collaboration space. Each fork can have its own branches, members, issues, pull requests, Actions, projects, tags, labels and wikis.

The common follow-up is whether you need a clone after forking. Yes, if you want to edit on your computer. The fork exists on GitHub only, so you clone your fork and not the original. If you only want to read the code, clone the original and skip the fork.

## Fork a repository in five steps

1. Open a public repository. GitHub's practice repository `octocat/Spoon-Knife` is a safe one to try.
2. Press **Fork** at the top right.
3. Choose the owner, which is your account or an organization where you can create repositories, and confirm or change the name. A checkbox lets you copy only the default branch.
4. Press **Create fork**. You land on `{you}/Spoon-Knife` with the original shown under the name.
5. Clone your fork: `git clone https://github.com/{you}/Spoon-Knife.git`. With GitHub CLI, `gh repo fork octocat/Spoon-Knife --clone` does steps 2 to 5 in one go.

There is no `git fork` command. Forking is a GitHub feature and not part of Git itself, which is why it happens on the website or through the CLI.

You can fork any public repository. A private repository can be forked only if its owner permits it, and a private repository cannot be forked to an organization on GitHub Free. Repository, organization and enterprise policies can narrow this further.

## Keep your fork in sync with upstream

A fork is a snapshot of the moment you made it. New commits in the original do not appear in your copy by themselves. The quickest route is the **Sync fork** button on your fork's page. On your computer the same job takes four commands:

1. `git remote add upstream https://github.com/octocat/Spoon-Knife.git` adds the original under the name upstream, once.
2. `git remote -v` lists your remotes so you can confirm both origin and upstream.
3. `git fetch upstream` downloads its new commits.
4. `git merge upstream/main` brings them into your branch. Use rebase instead if you prefer a straight history.

Make syncing the first step of every work session. A change built on a stale copy is the usual reason a pull request arrives with conflicts.

## Open a pull request from your fork

Create a branch in your fork for each change and keep your main branch equal to upstream. Commit, push the branch to your fork, and GitHub offers to open a pull request against the original. The maintainer can accept it, ask for changes or close it. After a request for changes, push more commits to the same branch and the pull request updates.

A pull request is optional. Plenty of forks never send one, because they are the start of a separate project. If you do send one from a personal account, you can allow the maintainers to push to your branch. That lets them rebase it or fix a small issue before merging. GitHub does not offer this for forks owned by an organization.

## What a fork shows to everyone else

Forking is not anonymous. The fork counter on the original goes up by one and your account appears among its forks. The Stack Overflow question "What does it mean to fork on GitHub" has been viewed 98,431 times, and one answer there states the same fact: forking is not anonymous. A public repository's forks are public, and a fork's visibility cannot be changed on its own.

The forks page under Insights lists every fork with its owner, and the network graph shows how work spread. Maintainers read that page to see who is building on the project: a fork with recent commits, open pull requests and stars of its own is someone using the code, and a fork untouched since the day it was made is only a copy.

One security note from GitHub's documentation applies to your own work. Repositories in a fork network share Git data, so commits pushed to any of them can be reachable from the others, including upstream, even after a fork is deleted. Keep secrets out of every commit you push to a fork.

What the fork count says about a project, next to stars and watchers, is in [stars vs forks vs watchers](https://gitwow.org/blog/github-stars-vs-forks-vs-watchers), and the Watch button has [its own guide](https://gitwow.org/blog/what-does-watch-mean-on-github). If you want developers to build on your repository, GitWow members fork public repositories by hand from their own accounts, with no password or token, only a link. [Get forks for your repository](https://gitwow.org/get-free-github-forks), or begin with [stars](https://gitwow.org/). Our [launch guide for GitHub projects](https://gitwow.org/blog/how-to-promote-your-github-project) covers the rest of the launch.

## Frequently asked questions

### What does it mean to fork on GitHub?

It means making your own copy of a repository in your account, linked to the original. You can change it freely, and your changes go back only through a pull request.

### What is the difference between forking and cloning on GitHub?

A fork is a new repository on GitHub under your account, and a clone is a copy of a repository on your computer. Most contributors do both: fork, then clone the fork.

### Do you need to clone after forking?

Yes, to edit on your machine. The fork lives on GitHub, so you clone it with `git clone` or `gh repo fork --clone`. Small edits can also be made in the browser.

### Git branch vs fork: which one do you need?

Use a branch when you can push to the repository and a fork when you cannot, or when you want an independent project. A fork also has its own issues and pull requests, and a branch does not.

### Is there a git fork command?

No. Fork is a GitHub feature, done with the Fork button or the GitHub CLI. Git itself offers clone, remote, fetch and merge for the steps around it.

### Is it compulsory to submit a pull request from a fork?

No. A fork can stay your own project indefinitely. A pull request is only the route for sending changes back to the original.

### Can anyone see that I forked a repository?

Yes. The original's fork count rises by one and your account shows in its list of forks. Cloning without forking leaves no such public record.

