<p>If you disable the &quot;Force Push&quot; permission, it will block users from deleting the branch.</p>
<p>The &quot;Force Push&quot; permission...</p>
<blockquote>
<p>Can force an update to a branch, delete a branch, and modify the commit history of a branch. Can delete tags and notes.</p>
</blockquote>
<p>See <a href="https://learn.microsoft.com/en-us/azure/devops/organizations/security/permissions?view=azure-devops&amp;tabs=preview-page&amp;WT.mc_id=DT-MVP-5002938" rel="nofollow noreferrer">more on these permissions on Microsoft Learn</a>.</p>

CC BY-SA 4.0
2023-05-26T07:58:43.580Z
Thx! Works like a charm. Probably beginner questions but just learning Azure DevOps.
Lieven Cardoen
CC BY-SA 4.0
2023-05-26T09:35:28.910Z
No question is a bad question. I'm glad it helped.
Fenton
CC BY-SA 4.0
2023-05-26T07:39:15.583Z
2023-05-26T07:39:15.583Z
Fenton
<p>In Azure DevOps, configuring a branch policy ensures the branch cannot be deleted. However this also obliges to use pul requests to make changes to that branch.</p>
<p>Currently we are not using pull requests yet, but we still would like to prevent certain branches from getting deleted.</p>
<p>Is there a way to do that other than branch policy?</p>

<azure-devops><git>
Is there a way to avoid deleting a branch in Azure DevOps without obliging pull requests?
Lieven Cardoen
# Is there a way to avoid deleting a branch in Azure DevOps without obliging pull requests?

(Asked by: username_0 on 2023-05-25)

In Azure DevOps, configuring a branch policy ensures the branch cannot be deleted. However this also obliges to use pul requests to make changes to that branch.

Currently we are not using pull requests yet, but we still would like to prevent certain branches from getting deleted.

Is there a way to do that other than branch policy?

**Tags:** azure-devops, git


---

## 1 answers

### Answer by username_1 on 2023-05-26. Score: 1 | Accepted answer

If you disable the "Force Push" permission, it will block users from deleting the branch.

The "Force Push" permission...

> Can force an update to a branch, delete a branch, and modify the commit history of a branch. Can delete tags and notes.

See [more on these permissions on Microsoft Learn](https://learn.microsoft.com/en-us/azure/devops/organizations/security/permissions?view=azure-devops&tabs=preview-page&WT.mc_id=DT-MVP-5002938).

> **Comments:**
> **username_0**: Thx! Works like a charm. Probably beginner questions but just learning Azure DevOps.  
> **username_1**: No question is a bad question. I'm glad it helped.  

---

