Skip to content

Introduction

Gitlint checks your commit messages for style.

Great for use as a commit-msg git hook or as part of your gating script in a CI pipeline.

pip install gitlint Successfully installed gitlint-core, gitlint # Add a bad commit message git commit --allow-empty -m " WIP: My bad commit title." -m "who   cares " [main a9f9368] WIP: My bad commit title. # Run gitlint! gitlinte 1: T3 Title has trailing punctuation (.): " WIP: My bad commit title."
1: T5 Title contains the word 'WIP' (case-insensitive): " WIP: My bad commit title."
1: T6 Title has leading whitespace: " WIP: My bad commit title."
3: B2 Line has trailing whitespace: "who   cares "
3: B3 Line contains hard tab characters (\t): "who   cares "
3: B5 Body message is too short (10<20): "who   cares "
# Gitlint is perfect for use in your CI pipeline. # Also available as a commit-msg hook or via pre-commit.

Features