Gitlint Cheatsheet | Git commit message linter

· 125 words · 1 minute read

gitlint: Git commit message linter checks your commit messages for style.

Check the last commit message:

gitlint

The range of commits to lint:

gitlint --commits single_refspec_argument

Path to a directory or Python module with extra user-defined rules:

gitlint --extra-path path/to/directory

Start a specific CI job:

gitlint --target path/to/target_directory

Path to a file containing a commit-msg:

gitlint --msg-filename path/to/filename

Read staged commit meta-info from the local repository:

gitlint --staged

For more information about git lint: https://jorisroovers.com/gitlint/ .

I hope this post helps you. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , Facebook , Telegram and GitHub .

Share: