Branch
A parallel version of a repository. It allows you to develop features, fix bugs, or experiment safely without affecting the main codebase.
What it is
A branch is an independent line of development within a repository. Creating a branch allows a developer to diverge from the main application and continue working independently. Once the work on a branch is verified, it is typically merged back into the primary branch.
When you would use it
You create a branch whenever you start a new task, ensuring your experimental or incomplete code does not destabilize the main application.
Common operations
- Isolating the development of a new feature.
- Creating a hotfix for a production bug.
- Reviewing code in a pull request.