What is a branch in Git?
A branch in Git is a separate container or context for changes. Any changes that you make in the context of the currently active branch will be kept separate from all other branches. This also means that any bugs or mistakes will only affect the branch they were committed in.
Developers are then able to work independently on a feature - without affecting their teammates when bugs (inevitably) occur.
All of this makes branches an invaluable tool for software projects of any size.
The Git Cheat Sheet
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!
In case you are using the Tower Git client, creating and managing branches is very easy. Many operations can simply be performed by using drag and drop!
Learn More
- Check out the chapter Branching can Change Your Life in our free online book
- More frequently asked questions about Git & version control