Skip to content

hk util no-commit-to-branch

  • Usage: hk util no-commit-to-branch [--branch <BRANCH>]
  • Effect: read-only

Prevent commits to specific branches

Flags

  • --branch <BRANCH> — Branch names to protect (default: main, master)
  • -h --help — Print help

Examples

Protect a named branch instead of the default main/master list.

sh
hk util no-commit-to-branch --branch production

Learn more

Built-in linters and utilities · Troubleshooting · All commands

MIT LicenseCopyright © 2026jdx.dev