Git branches are a pointer to a snapshot of your changes. When you want to add a new feature or fix a bug, you create a new branch to encapsulate your changes. This makes it harder for unstable code to get merged into the main code base, and it gives you the chance to clean up your future’s history before merging it into the main branch.