Glossary · Automation software engineering and architecture
Main branch
Also known as: Mainline, Trunk, Master branch
German: Hauptbranch
In version control, the main branch is the long-lived branch of a repository that holds the integrated, reference state of the code from which releases and feature branches are derived.
- Software engineering
In one sentence
The main branch is the long-lived repository branch holding the integrated reference state of the code from which releases are built.
Example
The PLC project team merges each reviewed feature branch into the main branch, and the nightly build creates the test image for the conveyor line from it.
How it applies
- Engineering: Teams protect the main branch with rules: changes arrive only through a Pull request with review and a passing Test pipeline. This keeps the main branch buildable at all times.
- Release management: A Software release is tagged on the main branch or on a release branch cut from it, so every shipped version can be traced back to one commit.
- Documentation: Documentation sources that live in the same repository follow the same rule. The documentation team should know which branch the published manual is built from and link each manual edition to a commit or tag, which supports the Configuration baseline.
Main branch vs. feature branch
The main branch is permanent and represents the agreed state of the product. A Feature branch is short-lived, isolates one change and is deleted after its Merge. Naming varies: older repositories call the main branch master or trunk.