Protected branches ensure that collaborators on your repository cannot make irrevocable changes to branches. Enabling protected branches also allows you to enable other optional checks and requirements, like required status checks and required reviews.
Protected branches block several features of Git on a branch that a repository administrator chooses to protect. A protected branch:
Can't be force pushed
Can't be deleted
Can't have changes merged into it until required status checks pass
Can't have changes merged into it until required reviews are approved
Can't be edited or have files uploaded to it from the web
Protected branches ensure that collaborators on your repository cannot make irrevocable changes to branches. Enabling protected branches also allows you to enable other optional checks and requirements, like required status checks and required reviews.
Protected branches block several features of Git on a branch that a repository administrator chooses to protect. A protected branch:
Further information: https://www.youtube.com/watch?v=hS7uybMi0z4