Get started with Bitbucket Cloud
New to Bitbucket Cloud? Check out our get started guides for new users.
Bitbucket Cloud tracks unmerged branches in the Feature branches view. You can use this view to manage your development process by doing any of the following:
A user must push a branch to the Bitbucket remote repository for it to appear as a feature branch. Feature branches lists only unmerged branches. To list the feature branches, log into Bitbucket do the following:
Navigate to your repository.
Select the Commits context from the navigation bar.
Click Show all.
The displays includes information about the branch in tags next to the date. In the preceding figure you can see the new-feature branch listed. You can also see that there was another branch fix-issue-1 which was recently merged into the main branch making the new-feature branch one commit behind.
You can use the Compare function to see differences between code lines. This function allows you to see individual files and the changes within those files. Try a comparison now:
Navigate to a repository with multiple branches. You can always create a branch in an existing repository so you can get more familiar with comparing branches .
Select the More options () button in the upper-right corner of the repository.
Select Compare tags or branches from the dropdown menu.
Select the branch you want to compare to the main branch.
Press the Compare button on this branch. Change the comparison fields if you like.
Bitbucket uses git diff ...
A three-dot diff is a comparison between the commit where the feature branch was last synched with the destination branch and the most recent version of the feature branch.
A two-dot diff is the direct comparison of two committish references such as SHAs.
If a feature branch is behind the current branch, you can sync (merge) the branch with the mainline. You sync a branch, for example, to catch your branch up to all the latest changes on the mainline.
Select Branches on the left sidebar.
Select the branch you want to sync.
From the Commits tab, select Sync now in the info banner under the tabs.
In the Sync branch dialog, select the Sync strategy dropdown to choose your preferred merge strategy.
Select Sync.
To view the conflicts, click the Diff tab.
For more information on the merge commit and rebase merge strategies, refer to our Learn git tutorials:
When you close or delete a branch, you lose all the unmerged changes on that branch. The branch also no longer appears under the Source list of Branches. You would close an unmerged branch, if for example, the branch represented some experimental testing that failed for which you no longer needed the work. To close a branch:
From the left sidebar, click Branches.
Locate the branch you created.
Click the More button in the top right.
Choose Delete branch.
Bitbucket displays a confirmation dialog.
Press Confirm.
Bitbucket closes the branch, and it no longer appears in your remote repository.
Was this helpful?