Blog
3 min read

Fork vs Clone: What's the Difference on GitHub?

Cloning copies a repository to your computer; forking copies it to your own GitHub account. When you need each, the fork-then-clone workflow for contributing to open source, keeping a fork up to date with upstream, and forks vs branches.

Both make a copy of a repository, but in different places:

  • Clone → a copy on your computer, linked to the original.
  • Fork → a copy on your GitHub account, linked to the original.

"Clone" is a Git command. "Fork" is a GitHub (and GitLab, Bitbucket) feature — Git itself has no fork command.

Clone: work on it locally

git clone https://github.com/team/app.git

You get the full repository on your machine. If you have permission to push to the original (it's yours, or your team's), you can work on a branch and push straight back. (git clone explained)

Fork: your own copy on GitHub

Click Fork on someone else's repository. GitHub creates github.com/you/app, a copy you fully control. You can push to it freely, even though you can't push to the original.

When you need a fork

You fork when you want to change a project you can't push to:

  • Contributing to open source — fix a bug in a library and propose the change.
  • Starting your own version of a project (respecting its licence). (Open source licences explained)
  • Using a template — though GitHub's "Use this template" button is cleaner, because it doesn't keep the fork link.

If you're on the team and have write access, you don't need a fork — just clone and use branches. (Git branches explained)

The contributing workflow: fork, then clone

# 1. Fork on GitHub, then clone YOUR fork
git clone git@github.com:you/app.git
cd app

# 2. Add the original as "upstream"
git remote add upstream https://github.com/team/app.git

# 3. Make a branch and your changes
git switch -c fix-typo
git commit -am "Fix typo in README"

# 4. Push to your fork
git push -u origin fix-typo

Then on GitHub, open a pull request from your fork's branch to the original repository. The maintainers review it and, hopefully, merge it. (What is a pull request?)

Now you have two remotes:

  • origin → your fork (you can push)
  • upstream → the original (you pull from it)

(git remote add origin)

Keeping your fork up to date

The original keeps moving. To bring those changes into your fork:

git fetch upstream
git switch main
git merge upstream/main
git push origin main

Or click Sync fork on your fork's GitHub page. (git fetch vs pull)

Side by side

Clone Fork
Where the copy lives Your computer Your GitHub account
A Git command? Yes No — a GitHub feature
Needed to contribute without write access No Yes
Can push to the original? Only with permission No — you open PRs instead
Typical use Everyday work Open source contributions

Fork vs branch

On a team, branches in the shared repository are simpler than everyone forking: one place, easy reviews, CI runs normally. Forks are for people outside the team.

Private repositories

Forks of private repos stay private and belong to the same access rules — and some organisations disable forking entirely. Deleting your access to the original also removes your fork.


EasySpawn clones your repository — fork or original — onto a persistent server where the app runs and Claude Code can work on your branch. See how it works or join the waitlist.

Related: git clone Explained · What Is a Pull Request? · Git and GitHub for Beginners · git remote add origin

Keep reading