rogerxu / git-tips

Tips for Git
Apache License 2.0
2 stars 3 forks source link

Protect Branches on GitHub #8

Open rogerxu opened 8 years ago

rogerxu commented 8 years ago
rogerxu commented 8 years ago

Prevent force push on protected branch

Protect this branch

Disables force-pushes to this branch and prevents it from being deleted.

rogerxu commented 8 years ago

Prevent direct push on protected branch

Require status checks to pass before merging

When enabled, commits must first be pushed to another branch, then merged or pushed directly to master after status checks have passed.

rogerxu commented 8 years ago

Only allow some people to merge pull request on protected branch

Restrict who can push to this branch

Specify people or teams allowed to push to this branch. Required status checks will still prevent these people from merging if the checks fail.