Updated July 19, 2026 · WarmStars
Short answer
A fork is your own server-side copy of someone else's repo. Open the repo, click Fork at the top right, pick an owner, click Create fork. Then clone the fork, add the original as an upstream remote so you can pull updates, and open a pull request to send changes back.
Two copies, two machines. A fork lives on GitHub's servers under your account. A clone lives on your laptop. Fork acme/rocketdb and you get a brand-new repo at github.com/dev-priya/rocketdb, full history, its default branch, yours to push to. Run git clone and you pull a repo down to disk instead. Forking is a GitHub feature. Cloning is plain Git (the split in one line).
You fork for exactly one reason: you cannot push to the original. Open-source maintainers do not hand out write access to strangers, so a fork is how you propose changes without asking. Already got push rights as a collaborator? Skip all of this. Branch inside the main repo and move on.
Fork on the web, clone on your machine. In that order.
1. Open github.com/acme/rocketdb while signed in.
2. Click Fork. Top right, next to Star and Watch. The number beside it is the current fork count.
3. Pick the owner on the Create a new fork screen: your account, or an org you belong to. No orgs means your account is the only option.
4. Rename it or edit the description if you want. Most people do not bother. Same name is fine.
5. Leave Copy the default branch only checked to grab just main. That is what you want almost every time. Uncheck it only if you need every branch.
6. Click Create fork. A few seconds later you land on github.com/dev-priya/rocketdb.
Now clone the fork, not the original. Grab the URL from the green Code button.
git clone https://github.com/dev-priya/rocketdb.git cd rocketdb
Check what you got:
git remote -v
One remote, origin, pointing at your fork. That is where git push lands. Add the original as upstream so you can pull maintainer updates later:
git remote add upstream https://github.com/acme/rocketdb.git
Two remotes now, two jobs. origin is your fork, you push here. upstream is the original, you pull from here. That split is the whole game.
Forks do not update themselves. Yours is frozen at the second you created it. When the project moves ahead, you pull the commits in by hand or your PR will not apply cleanly.
git fetch upstream git checkout main git merge upstream/main git push origin main
Want linear history? Swap the merge for git rebase upstream/main. It replays your commits on top of upstream and rewrites the commit hashes, so never rebase a branch other people already pulled.
Hate the terminal? GitHub has a Sync fork control above the file list whenever you are behind. Click it, then Update branch. Or one line from the CLI: gh repo sync dev-priya/rocketdb -b main.
Now the PR. Never work on main. Branch first.
git checkout -b fix-readme-typo git add . git commit -m "Fix typo in README install steps" git push origin fix-readme-typo
That pushes to origin, your fork. Right after, GitHub throws up a Compare & pull request banner. Click it. Miss it, and you open the original repo, hit New pull request, set base to acme/rocketdb main and compare to dev-priya/rocketdb fix-readme-typo. Write a clear title, a short why, click Create pull request. Any new commits you push to that branch update the same PR automatically. On GitLab this exact flow is called a merge request.
Five traps, roughly in order of how often people hit them.
1. Committing on your fork's `main`. Sync later and it turns into a mess. Always branch. main stays a clean mirror of the original.
2. Expecting the fork to auto-update. It never does. Sync before you start work.
3. Trying to make a public fork private. Cannot be done. Public forks stay public and sit in the same repository network. Need a private copy? Use GitHub's import or duplicate-a-repository flow, not the Fork button.
4. Forking your own repo into the same account. GitHub allows one fork per account, so dev-priya/rocketdb cannot fork back into dev-priya. Fork it into another org you own, or duplicate it under a new name.
5. Fearing the Delete button. Do not. Deleting your fork (Settings, then the Danger Zone) never touches the original repo or any PR you already merged. It only removes your copy.
How to Add a Contributor to a GitHub Repo
Invite collaborators, set permissions, and understand how forks let anyone contribute.
What Is a GitHub Gist?
The shareable snippet that is secretly a full Git repo.
GitHub Repo Insights and Analytics: What Each Tab Shows
Every tab in the GitHub Insights menu, what it measures, and where aggregate stats stop short of telling you who.
Free to start. Two scans a month, no credit card.