Skip to main content

Enforces conventional git commit messages for git repositories

Project description

pypi python implementation

license last-commit



Enforces conventional git commit messages for all new git repositories you create by running git init .. For existing repositories, you can go to your source directory and simply run:

enforce-git-message .


pip install enforce-git-message


Go to your source folder and try to commit with a non-conventional message like this and it should fail:

> git commit -m "added a new feature for xyz"
Traceback (most recent call last):
  File "C:/Users/prahlad/Documents/scripts/", line 14, in <module>
  File "C:/Users/prahlad/Documents/scripts/", line 11, in main
	if m == None: raise Exception("conventional commit validation failed")
Exception: conventional commit validation failed

After that, try doing the commit with a valid message and it should work:

> git commit -m "feat(test): added xyz"

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for enforce-git-message, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size enforce-git-message-1.0.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page