_Basics of Branching
Branching offers a way to work on a new feature without affecting the main code line. You can branch on a local repository and make changes without ever making that branch visible in Bitbucket Cloud. Or you can push a branch up to Bitbucket so other repository users can access and work with your changes.
There are a number of ways to branch a repository this documentation only shows you the very basic ways to branch. Review your Git or Mercurial resources to get fancy with branching. From a Bitbucket perspective, you have to do some extra work to get a branch to appear:
Git | Mercurial |
---|---|
Clone a repository to your local system. | Clone a repository to your local system. |
Create a branch on your local system.git branch BRANCH_NAME | Create a named branch. |
Push the branch to Bitbucket.git push origin BRANCH_NAME | Push the repository to Bitbucket. |
Git branches always have a name. Mercurial has the concept of branch and named branch. (Steve Losh's guide is a good resource explaining branching in the two systems).