Branch
Definition
A branch is a named development line in Git, whose reference moves forward with new commits.
A branch in Git is a named reference to the current state of a development line. New commits on this branch move its reference forward. This allows changes to be developed separately and later merged; a branch is not a complete copy of all project files.
Simply explained
You work on your own development line while other changes can initially remain on other lines.
Why it matters in practice
Branches help organize unfinished features and bug fixes in a traceable way and to selectively review their integration into shared states.
Example from business
Example: A team develops a new form on its own branch and then merges the reviewed changes into the main branch.
Limits and pitfalls
- A branch name does not guarantee any specific content or release status. main and master are names; HEAD denotes the current reference and is not a synonym for branch.
Origin & history
Git represents branches as movable references to commits. This distinguishes the development line from a fixed named version point.
Use in mid-sized companies
- Companies can separate changes by tasks and incorporate them into shared product states through documented review and merge processes.
Frequently asked questions
Is a branch a backup?
Not by itself. It points to a state within a repository; independent backup and reliable storage remain additional tasks.
Sources
- gitglossary – branch. · Git (o. J.): gitglossary – branch.
- git-branch. · Git (o. J.): git-branch.
Editorially reviewed on: