GitHub Branch Policies? #21921
-
Hi everyone! I’m trying to see if GitHub has a feature similar to VSTS (Microsoft) where you can institute branch policies , or requirements that prevent direct pushing of commits to a particular branch. In this case, users would have to make a pull-request in order to push code into its upstream. Is there any option like that? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @ryhsh72, Yes, GitHub does have something like that! You can implement this sort or restriction through GitHub’s protected branches. You can even require that all pull requests require reviews before they get merged into the protected branch. Does that help? Thanks! |
Beta Was this translation helpful? Give feedback.
-
That is exactly what I needed, thank you @that-pat! 😃 |
Beta Was this translation helpful? Give feedback.
-
You’re very welcome! |
Beta Was this translation helpful? Give feedback.
Hi @ryhsh72,
Yes, GitHub does have something like that! You can implement this sort or restriction through GitHub’s protected branches. You can even require that all pull requests require reviews before they get merged into the protected branch.
Does that help?
Thanks!