How to delete a branch in Bitbucket

You must learn how to delete a branch in Bitbucket if you want to clear the clutter. At times, you and your team might end up creating many branches while working on a project. When a branch has already been merged, what’s the point of keeping it right? If you are the one in charge of maintaining your code base, it is a good idea to keep it clutter-free.

Just follow the below-mentioned simple steps in order to delete a branch in Bitbucket. Remember this post is meant for people whose code is on Bitbucket.

Steps to Delete a Branch in Bitbucket

I am assuming that you are already on Bitbucket and are able to see your source code. Also, this post assumes you have editing rights of course.

Step 1: On the left-hand side of the screen look for the symbol of branches. If you hover your mouse over it, it will say branches as shown in the image below:

branches option in bitbucket from where you can delete a branch

Step 2: Navigating to the branches page will show you all the branches that you or your team have created apart from your master branch. Let’s try to delete an MFA branch that I had created.

meatball menu action item

Step 3: Look for the branch that has already been merged that you wish to delete. On the Actions section of that particular row, click on the meatballs menu symbol.

deleting a branch option in bitbucket

On doing so you will find the option to Delete the branch at the bottom.

Step 4: Click on the Delete branch menu item.

Once clicked a small dialog box might pop up to confirm the kill.

Step 5: Just click on the Delete button confirming the delete.

As you can see in the image below the branch has vanished from the list:

That’s it!

NOTE: Remember the default branch (in this case master) cannot be deleted, so even if someone ends up doing a foul play you are safe with your codebase there. As you can see in the image below there is no option to delete the branch.

Hope you enjoyed learning about deleting branches in Bitbucket. Also, learn how to delete a local or remote branch on Git.

Scottshak

Poet. Author. Blogger. Screenwriter. Director. Editor. Software Engineer. Author of "Songs of a Ruin" and proud owner of four websites and two production houses. Also, one of the geekiest Test Automation Engineers based in Ahmedabad.

You may also like...

Leave a Reply