gitlint
Git commit message linter written in python, checks your commit messages for style.
What it is and what it does
Gitlint is a Python-based linter for Git commit messages that enforces style conventions at the point of commit. It runs as a command-line tool or Git hook and checks commit messages against a set of configurable rules—catching issues like line length violations, missing subject lines, or improper formatting before they reach your repository.
The package depends only on gitlint-core and supports Python 3.7, 3.8, 3.9, 3.10, and 3.11 on CPython and PyPy. It has been in production use since its early releases and maintains a stable API, though active development has slowed significantly. The tool is designed for teams that want to enforce consistent commit message standards across their codebase.
Use it for:
- Enforce consistent commit message formatting across a team to improve repository history readability.
- Prevent commits with empty subjects or excessively long lines from entering the main branch.
- Integrate into CI/CD pipelines to validate commit messages on pull requests or before merge.
- Configure custom rules to match your project's specific commit message conventions.
- Use as a pre-commit Git hook to catch style violations locally before pushing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Gitlint is a command-line tool that validates Git commit messages against configurable style rules, catching formatting and content issues before they enter your repository.
Yes, if you need commit message linting and can accept dormant maintenance. The package is stable, has no known vulnerabilities, and a large user base. The lack of recent updates is a concern only if you need active bug fixes or new features; for enforcing existing commit standards, it works reliably. Consider it if your team values commit hygiene and you're comfortable with a mature, slow-moving tool.
Install
gitlint on PyPI
pip
pip install gitlintuv
uv add gitlintpoetry
poetry add gitlintInstalling gitlint
Before you install
Low install friction with a single runtime dependency. Maintenance is dormant—last release was over a year ago and the maintainer is actively seeking co-maintainers, though the repository remains active and the project is marked stable.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute gitlint freely with minimal restrictions.
Quickstart
pip install gitlint
# In a git repository, run:
gitlint
# Or lint a specific commit:
gitlint --commit <commit-hash>
Verify before relying
- Whether the dormant maintenance status affects real-world reliability or if the stable codebase requires minimal updates.
- Whether the search for co-maintainers indicates risk of abandonment or reflects normal open-source dynamics.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — gitlint-core |
| Maintenance | dormant — 1,253 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 831,770/month — #4,941 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gitlint-0.19.1-py3-none-any.whl
Keywords: git, gitlint, lint
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
gitlint-coreLints Git commit messages against configurable…
permissive · top 5,000 on PyPI
PyDrillerPyDriller extracts commit history, developer…
permissive · top 15,000 on PyPI
yamllintyamllint checks YAML files for syntax errors,…
copyleft · top 1,000 on PyPI
zizmorzizmor is a static analysis tool that scans…
permissive · top 5,000 on PyPI
sphinx-lintSphinx Lint checks reStructuredText and Python…
permissive · top 15,000 on PyPI
salt-lintsalt-lint checks Salt State files (SLS) for…
permissive · top 15,000 on PyPI
taploTaplo is a TOML v1.0.0 toolkit that provides…
permissive · top 15,000 on PyPI
pylint-actionsA Pylint plugin that formats linting output as…
permissive · top 15,000 on PyPI
import-linterImport Linter enforces architectural…
permissive · top 5,000 on PyPI
lintrunnerLintrunner orchestrates and runs multiple…
unclear · top 5,000 on PyPI