The 'delete' button is disabled and unable to delete the branch from the repository.


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

   

Summary

Unable to delete the branch from the repository. The delete button is no longer accessible and it is disabled. 

Cause

Check if the branch restriction of "Allow deleting this branch" is unchecked and if the branch has any active pull request that needs to be merged. 

Solution

  1. Confirm if the branch restriction of "Allow deleting this branch" is allowed or not in the repository.
    • Go to the Repository Settings.
    • Select Branch Restrictions (Workflow).
    • Confirm if any branch restriction has a pattern that matches the branch you are trying to delete. 
    • In the custom settings, confirm if "Deleting this branch is not allowed" is specified. 
    • If yes, select "Edit", Check "Allow deleting this branch" and Save.
    • Now try deleting the branch. 

        2. Confirm if the branch you are trying to delete has any active pull requests.

    • Open the Repository and Select the Pull Requests tab.
    • In the "target branch", enter the name of the branch you are trying to delete. 
    • If there are any active pull requests, approve or decline them.
    • Now try deleting the branch. 

        3. If you are still unable to delete the branch, click on the "Branches tab" and just hover over the "delete" button. You will be seeing the reason why the branch was not able to delete.

            (info) For example, it is not possible to delete the 'main' branch of the repository and the same is displayed when you hover over the dithered "disabled" button.  

(info) If the "Delete" button is not disabled and when trying to delete the branch if there is an error while deleting the branch, it might be possible that the specific branch has some lock files in the backend or other similar issues. You may reach out to the Bitbucket Cloud Support Team for further assistance. 




Last modified on Jun 28, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.