Answers: <p>You should not delete the branches at all. Just rename them to stale!</p>
  <p>but</p>
  <p>As of Bitbucket 7.3 there is an option to delete branches automatically after merge. Just prevent deletion at all, set the other option and you are done.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-06-07T10:12:44.620Z
Answers: Any specific reason, why we should not delete the merged branches?
Answers: Akshay Kapoor
Answers: CC BY-SA 4.0
Answers: 2021-06-08T11:50:38.403Z
Answers: That is what you are faced with. "restrict the branch closer only after merge".
  If you don't delete them, you don't have to. If you state them as "stale" you can easily see what change came from what branch.
  If anything is wrong, in the (far) future, you can correct that in the "stale" branch and connect the changes/fix to the affecting branch.
Answers: David
Answers: CC BY-SA 4.0
Answers: 2021-06-07T06:51:05.613Z
Answers: 2021-06-07T06:51:05.613Z
Answers: David
Body: <p>We are using GitFlow workflow. After merging the release/* branch to master, we need to close the branch. For this task, we need to provide deletion access to pull request merger but in this case, merger can delete the release/* branch any time. </p>
  
  <p>Do we have any option to restrict the branch closer only after it is merged to some other branch ?</p>
  
Tags: <git><bitbucket>
Title: Bitbucket: Is there any option to restrict deletion of release branch only after it is merged to master
UserDisplayName: Akshay Kapoor
ThreadText: # Bitbucket: Is there any option to restrict deletion of release branch only after it is merged to master
  
  (Asked by: username_0 on 2019-11-08)
  
  We are using GitFlow workflow. After merging the release/\* branch to master, we need to close the branch. For this task, we need to provide deletion access to pull request merger but in this case, merger can delete the release/\* branch any time.
  
  Do we have any option to restrict the branch closer only after it is merged to some other branch ?
  
  **Tags:** git, bitbucket
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-07. Score: 1
  
  You should not delete the branches at all. Just rename them to stale!
  
  but
  
  As of Bitbucket 7.3 there is an option to delete branches automatically after merge. Just prevent deletion at all, set the other option and you are done.
  
  > **Comments:**
  > **username_0**: Any specific reason, why we should not delete the merged branches?  
  > **username_1**: That is what you are faced with. "restrict the branch closer only after merge". If you don't delete them, you don't have to. If you state them as "stale" you can easily see what change came from what branch. If anything is wrong, in the (far) future, you can correct that in the "stale" branch and connect the changes/fix to the affecting branch.  
  
  ---
  
  