Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to block push in BitBucket

We have Bitbucket Cloud. My question is how to block the opportunity to "push" but save "create and merge pull requests"?

Groups has the "Write" permission, 

2 answers

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 01, 2023

Hi @Vsevolod Romanchenko and welcome to the community!

If you are an admin of a Bitbucket Cloud repo, you can do the following:

  1. Open the repository on Bitbucket cloud website
  2. Select Repository settings from the left sidebar
  3. Select Branch restrictions from the left sidebar
  4. You can then set up a branch restriction with the following options:

    Screenshot 2023-03-01 at 15.23.19.png

If you set Write access to Only specific people or groups have write access and then leave the field below it empty, no one will be able to push to the branch or branches with this restriction.

In the Select branches option, you need to specify the branch name or pattern for which the restriction will apply.

You can see more details on branch restrictions here:

Please feel free to let me know if you have any questions.

Kind regards,

I have already do this. The main problem: what if I will have 150 repos, I need to go into each repo settings ? Maybe, in the future BitBucket Cloud will have some automation rules, like in Jira Cloud...

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 03, 2023

Hi @Vsevolod Romanchenko,

Our development team has been working on a feature that will allow admins to set branch permissions on a project (and then these will apply to all repos of a certain project). When this is implemented, we are going to update the public feature request we have in our issue tracker:

You can also add yourself as a watcher to that feature request (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

In the meantime, until this feature is implemented, another option would be to write a script that uses our APIs in order to set the branch restrictions.

The following API endpoint gets all repos in a workspace:

This API endpoint creates a branch restriction for a repository:

Kind regards,

Yolu can arrange that by Branch Permissions. There is an option “changes without PR”

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events