Getting Started
git-sumi is the non-opinionated Rust-powered commit message linter.
Following clear guidelines for commit messages and consistently adhering to them makes using Git and collaborating with other developers much smoother.
Let's see how to get started with git-sumi in less than 5 minutes.
Quick start
- Install git-sumi:
- Cargo
- pip
- chocolatey
- Pre-built binaries
cargo install git-sumi
pip install git-sumi
choco install git-sumi
Download the latest release from the releases page.
- Initialize git-sumi from the root of your project:
git sumi --init
Edit the default configuration (sumi.toml
) to your liking. Check out the examples for some ideas.
You can either use git-sumi directly from the command line or set up a Git hook.
Git commit-msg hook
Set up a hook to lint your commit messages automatically:
git sumi --init commit-msg
This will create a Bash Git commit-msg
hook in your .git/hooks
directory. The hook will interrupt any commits that don't pass the rules you've set up.
Command line
Use git-sumi with -c | --commit
to validate the commit message before committing:
git sumi -c '🎨 refactor: format JS with Prettier'
If your message passes all rules, it will be committed. Otherwise, you'll see what went wrong.
Contributing
Please do! We appreciate bug reports, improvements to documentation (however minor), feature requests, code contributions… To get started, take a look at the contributing guidelines.