Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent file deletion in bitbucket ?

Dineshmathiazhagan August 10, 2019

If a developer accidentally deleted a file and tries to merge his branch to remote branch's he may delete files how do we prevent any pull request to avoid merge if there is a file deletion ?

1 answer

0 votes
Joao Sgreccia
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2019

Hi @Dineshmathiazhagan  

Currently, there isn't a way of doing that. However, you can set the branch permissions for your repository to require a minimum number of approvals before merging the pull request.
This will present an opportunity for code review as well.

Jimmy Seddon
Community Champion
August 12, 2019

Hi @Dineshmathiazhagan

Adding to what @Joao Sgreccia said you can also setup default reviewers for repositories if there are "experts" that should either review all the changes or at least be informed that changes are happening.

Just another thought.

-Jimmy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events