Block direct push on the master branch

Asked

Viewed 1,492 times

1

I am starting a private project on Github and will have the participation of 5 developers and I will be the leader of this project. Each developer will have their branch to publish the files for review. And I will be responsible for validating before upgrading to the master branch. To ensure that none of the programmers upload the modifications directly to master, they would like to block it, so that they do not risk updating a version with errors in the master branch. How do I block direct push on the master branch?

  • 1

    Look at these links from the github website.. Gives to you block who can publish directly on master. I’m not sure that would solve your problem https://help.github.com/en/articles/enabling-branch-restrictions or https://help.github.com/en/articles/configuring-protected-branches

  • This link can help you: https://cursos.alura.com.br/forum/topico-lock-no-branch-24979. Enjoy a read on this tbm: https://willianjusten.com.br/trabando-git-hooks-de-forma-facil/

  • look at this strategy of each dev having a branch seems bad to me... and it will still give you work to merge all these branches.... it would be easier to use a single branch from master that they push there, or each create a Fork (most recommended) from that branch, and only you have permission to merge to master

  • @Raquelandrade, I hired the Github PRO plan and doesn’t show the "Restrict who can push to this branch"

  • @Rafaelchristófano on the second link, right at the beginning, he says that Protected branches are available for Github Pro It may be the case to search the Github documentation. I found this other link tbm https://help.github.com/en/enterprise/2.15/admin/developer-workflow/configuring-protected-branches-and-required-status-checks

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.