Single hook ID:
rip0005-gitflow
repos:
- repo: <hook-repo-url>
rev: <tag-or-commit>
hooks:
- id: rip0005-gitflowpre-commit install --install-hooks --hook-type commit-msg --hook-type pre-pushcommit-msg: blocks direct commits tomain,master, anddevelop, and rejects stale merge commits.pre-push: checks that topic branches include the latest tip of their GitFlow base, blocks non-merge commits on protected branches, and blocks overlapping stale merges on protected branches.
The rebase check supports these topic branch prefixes and selects a base accordingly:
feature/*andrelease/*usedevelop.hotfix/*usemain(ormasterwhenmainis absent).main,master, anddevelopare checked against their own remote tips.- Other topic branch names are rejected.
- The required base branch must exist on
origin; otherwise, the push is rejected with an error.
remote: origin
protected branches: main master develop
arguments: none