main branch

The branch a repository treats as its primary line of work, usually named main (older repositories often use master).

In more detail

Git has no built-in rule that makes it special; it is whatever the first branch was called (see init.defaultBranch) and what the team agrees to merge into. Hosting services show it by default and usually protect it from direct pushes.

Related terms

Taught in

References