GH-900 ยท The GitHub community
Fork, template or clone: what is the difference?
Forking to contribute to a project you cannot push to, forks versus templates versus clones, and topics, READMEs and descriptions that make repositories discoverable.
Key points
- A fork is your own copy of someone else's repository on GitHub, used to propose changes upstream, and it keeps the full history.
- A template starts a new project from a repository's files with a single fresh commit.
- A clone is a copy on your computer.
- Topics, a clear README and a description help others find a repository.
Practice questions
What is a fork?
- A copy of a repository on your own computer
- A personal copy of another user's repository in your account
- A branch protection rule
- A release asset
Show answer
Answer: B. A personal copy of another user's repository in your account
A fork lives on GitHub in your account and lets you change code freely and open pull requests upstream. A copy on your computer is a clone.
Which statements correctly compare forks and template-based repositories?
- A fork keeps the parent's full commit history
- A repository from a template begins with a single commit
- Commits to a fork count toward your contributions graph
- Template-based repositories share history with the template so you can merge freely
- Forks are meant for starting unrelated new projects
Show answer
Answer: A. A fork keeps the parent's full commit history, B. A repository from a template begins with a single commit
Forks keep full history and are for contributing; templates start fresh with one commit. Fork commits do not count toward the contributions graph, and template branches have unrelated histories.
Commits you make to a fork count toward your contributions graph.
Show answer
Answer: False
Fork commits do not count toward the graph, while commits in a repository created from a template do.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
