Skip to content

Branches and forks

Both branches and forks allow you to work in parallel.

They serve slightly different purposes.


Branch

A branch is another line of development inside the same repository.

Used for:

  • alternative experiments
  • testing variations
  • short-term changes

Branches stay inside one repository.


Fork

A fork is a full copy of a repository.

Used for:

  • independent work
  • external collaboration
  • bigger separation

Forks are separate repositories.


Quick comparison

Branch → lightweight, inside same repo
Fork → full copy, separate repo


Tip

Use branches for small variations.
Use forks for independent work.