Skip to content
Rolls back any commits made directly to a branch of your choice, branching it and making a PR instead.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.githook.yml
LICENSE
README.md
protect-branch.js

README.md

GitHook Super-Protected Branches

Rolls back any commits made directly to a branch of your choice, branching it and making a PR instead.

Caution: this GitHook is in its infancy, so there may be bugs in its implementation, meaning you could lose commit history or even entire files! Use at your own risk.

Requirements:

  • counterintuitively, your branch must NOT be marked as a Protected Branch, as the Super Protection mechanism requires the ability to force push to your branch. There is an open issue for making this GitHook work with Protected Branches, but this is unlikely to be fixed anytime soon.

Caveats:

Bug fixes and other contributions are welcome and actively encouraged.

You can’t perform that action at this time.