Forking vs Cloning: What’s the Difference and When to Use Each
Avoid the rookie mistake — know when to fork and when to clone




Note:
This guide is written for solo developers working independently with Git.
If you’re working in a team or contributing to shared repositories, some practices may differ.
A follow-up guide on team workflows, conflict handling, and collaboration best practices is coming soon.
Most beginners confuse forking and cloning — or think they’re interchangeable. They’re not. Understanding the difference is key to contributing to open source projects and managing your own.
What’s a Clone?
Cloning is making a local copy of a Git repo:
“I want a working copy of this project on my computer.”
- It pulls the entire history (commits, branches, tags)
- It’s connected to the original repo’s remote (usually called
origin) - You can push/pull changes if you have permission
Use it when:
- You own the repo
- You’re working inside a team with push access
- You’re contributing to a private/internal project
What’s a Fork?
Forking is making your own copy of someone else’s repo — on GitHub:
“I want my own version of this project so I can edit it freely.”
- Forks live on GitHub under your account
- You can clone your fork to your machine
- You’ll later make a pull request back to the original
Use it when:
- You don’t have write access to the original repo
- You want to propose a fix or feature
- You want to experiment without touching the main project
Fork + Clone = Collaboration Workflow
If you’re contributing to an open source project:
- Fork the repo on GitHub
- Clone your fork locally
- Make your changes in a branch
- Push changes to your fork
- Open a pull request back to the original repo
Why Does It Matter?
Beginners often clone a public repo, make changes, then wonder why they “can’t push.”
That’s because you’re not a contributor — and cloning doesn’t grant you write access.
Forking is your way around that. It gives you your own space to work, without breaking the original.
Common Pitfalls
- Cloning when you should fork: leads to permission issues
- Forking then never syncing with the original: your copy becomes stale
- Forgetting where your remotes point: always double-check
git remote -v
Best Practices
- Clone if you’re on the core team
- Fork if you’re contributing to someone else’s project
- Always create a new branch before making changes
- Name your remotes clearly: use
originfor your fork, andupstreamfor the original
TL;DR
- Clone = local copy of a repo you have access to
- Fork = your own GitHub copy of someone else’s repo
- Use forks for open source contributions, then submit pull requests
- Keep remotes clear and stay in sync
That’s a Wrap:
This wraps up our GitHub beginner workflow series — unless you’ve got a topic you want us to tackle next. Let us know!