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


Today, while I was working on an article that talks about Azure Data Factory – Collaborative development of ADF pipelines using Azure DevOps – Git 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.


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

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

Happy learning!


Do you like this article? If you want to get more updates about these kind of articles, you can join my Learning Groups





    1. Go to Project Settings. Under the Repos header, choose Repositories. On the Repositories page go to the Permissions tab. Search for your user account (or the team, group, etc. you want to edit). Change Force push (rewrite history, delete branches and tags) to Allow


Leave a Reply

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

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

Facebook photo

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

Connecting to %s