Fork

A fork is your own personal copy of someone else's repository on a hosting service like GitHub. It lets you freely experiment and propose changes back via a pull request without affecting the original.

Git & DevOps

Forking is a GitHub feature, not a Git command. It is the standard way to contribute to open-source projects: you fork the repo, clone your fork, make changes, push them, and open a pull request to the original.

A fork lives under your account, while a branch lives inside a single repository — they solve related but different problems.

Examples

Bash

# After forking on GitHub, clone your copy:
git clone https://github.com/you/Hello-World.git

Output:

Cloning into 'Hello-World'...

Learn it in a lesson

See also

Back to the Dictionary