Logo hdtoledo
hdtoledo.dev
Módulos_del_Sistema
MÓDULO_TEÓRICO

Branches: Parallel Universes

Branches: Parallel Universes

Branches are Git's most powerful feature.

Imagine writing a movie script (branch main). You think of an alternate ending. Instead of messing up the original script, you create a parallel "copy" (a new branch). If you like it, you merge it into the main story. If not, you delete it.

The Main Branch

By default, you are on the main branch (formerly master). The main branch should always be sacred and stable, because it represents production code.

When to create branches

  • For developing new features.
  • For fixing bugs (hotfixes).
  • For experimenting.