BitBucket has a setting to prevent push to these branches by certain users. but.
- You can't place all members in this list
- Users placed in this list cannot merge pull requests either
Bitbucket lets you limit write access to certain branches. If you have a relatively small group where everybody knows everybody else, then allow everyone write access but make a rule that nobody should push directly and nobody should merge their own pull request. That usually works fine -- everybody can see changes to the repo, so it'll be pretty clear if somebody violates the rule.
For larger groups, define a set of users who are allowed to review and merge pull requests from others. This is how most open source projects work -- anybody at all can send a pull request, but only a small group of trusted committers can accept and merge the contributions.
The same strategy applies even with a small group, if necessary: give just one or two people commit privileges, at least at first, so that only they can merge pull requests. You can't block everyone from having write access, though, or else nobody can merge and those branches can never change.
If you still want to block push/commits locally, you can use git hooks
block pushes from certain branches locally
block commits on certain branches locally