# Fork vs Branch

URL: https://softwaredictionary.org/compare/fork-vs-branch
Last updated: 2026-09-30

In short: A fork is a full copy of a repository under another owner, used to contribute where you can't push, while a branch is a separate line of work in the same repo.

## What is the difference between a fork and a branch?

A fork is a full copy of someone else's repository, including its branches and history, created under your own account on a code hosting platform. A branch is a movable pointer to a commit inside a Git repository, letting you work on a feature or fix without touching the main line of code.

The difference is ownership and permissions. Branches live in one repository and are shared by everyone with write access, which suits a team working together. A fork gives you your own repository with full control, which is how people contribute to open-source projects they cannot push to: they change their fork and open a pull request back to the original, often called upstream.

Forks and branches are used together. Inside a fork, you still create a branch for each change, and the pull request asks to merge that branch into a branch of the upstream repository. To keep a fork current, you add the original as a remote named `upstream` and fetch its changes.

A common misconception is that forking is a Git command. Git itself only has clones, branches and remotes; forking is a feature of hosting platforms that makes a server-side copy and remembers the link back to the original.

| Aspect | Fork | Branch |
| --- | --- | --- |
| What it is | A full copy of a repository under another owner | A named line of work inside one repository |
| Where it lives | A separate repository on the hosting platform | Inside the same repository as the main code |
| Permissions | You have full control over your copy | Needs write access to the repository |
| Created with | A button or API call on the hosting platform | `git branch` or `git switch -c` |
| Staying current | Fetch from an `upstream` remote | Merge or rebase from the main branch |
| Visibility of work | Separate from the original until a pull request | Visible to everyone with access to the repository |
| Best for | Open-source contributions and independent variants | Features, fixes and experiments within a team |

## Choose Fork when

- You don't have write access to the original repository.
- You are contributing to an open-source project.
- You want to start an independent version of a project.

## Choose Branch when

- You are on the team and can push to the repository.
- You are building a feature or fix that will merge back soon.
- You want to experiment without leaving the project.

## Frequently asked questions

**Should I fork or branch?**

Branch if you have write access to the repository, which is typical inside a team. Fork if you don't, as with most open-source projects, and send your changes back through a pull request.

**Is a fork the same as a clone?**

Not quite. A clone is a copy on your own machine, while a fork is a server-side copy under your account that keeps a link to the original repository.

**Can a fork have branches?**

Yes. A fork is a full repository, so you create branches in it as usual, and pull requests are usually opened from one of those branches.

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
