Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2023-05-26T07:58:43.580Z
Answers: Thx! Works like a charm. Probably beginner questions but just learning Azure DevOps.
Answers: Lieven Cardoen
Answers: CC BY-SA 4.0
Answers: 2023-05-26T09:35:28.910Z
Answers: No question is a bad question. I'm glad it helped.
Answers: Fenton
Answers: CC BY-SA 4.0
Answers: 2023-05-26T07:39:15.583Z
Answers: 2023-05-26T07:39:15.583Z
Answers: Fenton
Body: <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>
  
Tags: <azure-devops><git>
Title: Is there a way to avoid deleting a branch in Azure DevOps without obliging pull requests?
UserDisplayName: Lieven Cardoen
ThreadText: # 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.  
  
  ---
  
  