Fork vs Clone vs Branch: Choose the Right Boundary
Three different operations
Imagine a public garden notebook maintained by a community. You can read it, but you cannot push to its main branch without permission. A fork is a related hosted repository under a permitted owner. A clone is a Git repository on your computer. A branch is a named reference inside a repository. These mechanisms can be combined: fork the project, clone your fork, then create a feature branch. A fork does not grant write access to the original project.
Draw the ownership map
Use three boxes: original repository (upstream), contributor fork (origin), and local clone. The names origin and upstream are conventions, not permission labels; inspect the actual URLs before sending anything. If you already have permission to create a branch in a shared repository, a fork may not be necessary. Private forks depend on service and organization policy. A public project still has license and contribution rules.
Offline model
The chapter lab builds two bare repositories and a contributor clone. The bare fork begins as a copy of upstream history, but is not a GitHub fork network. It does not reproduce hosted issues, settings, permissions or pull requests. When you create a local feature branch, neither bare repository gains that branch until a push. The lab uses only file transport and synthetic content.
Practice example
In the contributor clone, origin and upstream point to distinct fixture-owned bare repositories; main is current. Remote-tracking names are local records.
Check your understanding
Draw the three repositories and label the location of a local feature branch before and after push.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Fork vs Clone vs Branch: Choose the Right Boundary — knowledge check
Reason about fork collaboration and contribution trust boundaries.
Which operation creates a related hosted repository?
Where does a newly created local branch initially exist?
What does forking grant on the original project?
What determines where origin points?
When might a fork be unnecessary?