Creating branches in Bitbucket
Working off the default branch in Bitbucket is not the best practice as it impacts the main code base, which should be as stable as possible. Instead, you should consider utilizing branches in Bitbucket, and this recipe will cover the basics of branching. There are different techniques when it comes to branching strategies. This recipe will simply cover the mechanics of creating branches.
Getting ready
Before jumping into the mechanics of how to create branches in Bitbucket, let’s discuss the different types of branches available. There are different branching strategies in the world of Git. For this example, Gitflow will be used to illustrate how branching typically works. Gitflow is well documented by Atlassian, so Gitflow will be used to explain branching strategies in this recipe:
- Main: The main branch should be the most stable branch in your repository. This means that the code in the main branch should be the most complete and...