There are two main approaches you can take to prevent undesired pushes:

  • protected branches
  • push rules

Protected Branches

In order to setup a protected branch please check these docs out:

Push Rules

In order to setup a Push Rule please check this doc out: