Azure DevOps – Failed to delete branch. Force push permission is required to delete branches

Advertisements

Today, while I was working on an article that talks about Azure Data Factory – Collaborative development of ADF pipelines using Azure DevOps – Git (article coming soon) I had to create and delete branches. While deleting, i got an alert with the message Failed to delete branch. Force push permission is required to delete branches.

I was surprised to see that message as I was logged in as an user with the Project Administrator role and of Basic Access Type. Moreover, it was me with the same account who has created that branch.

Advertisements

After researching, I noticed that somehow the property Force Push was Not Set for the branch that i was trying to delete.

And, after setting the Force Push value to Allow, then I was able to delete that branch.

In order to edit the Force Push, you need to navigate to the branch which you want to delete, click on the three dots to open up the context menu as shown below.

1. Azure DevOps - Branch - Security Force Push

Once you click on the Branch Security in the previous step, you will get a popup where you can edit allow the Force Push for that branch as shown below.

2. Azure DevOps - Branch - Force Push - Set Allow
Advertisements

After setting the Force Push to Allow, you will be able to delete the branch.

Happy learning!

Advertisements

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s