Skip to content

About

Pre-commit hook for RIP 5: GitFlow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RIP 5 Git Hooks

Single hook ID:

  • rip0005-gitflow

Configure

repos:
  - repo: <hook-repo-url>
    rev: <tag-or-commit>
    hooks:
      - id: rip0005-gitflow

Install

pre-commit install --install-hooks --hook-type commit-msg --hook-type pre-push

What It Checks

  • commit-msg: blocks direct commits to main, master, and develop, 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/* and release/* use develop.
  • hotfix/* use main (or master when main is absent).
  • main, master, and develop are 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.

Defaults

remote: origin
protected branches: main master develop
arguments: none

About

Pre-commit hook for RIP 5: GitFlow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages