A git extension to help write conventional commits
# you can invoke either of the below to
# interactively write a conventional commit
git cc
git cc feat # start after the commit-type
git cc 'feat(scope)' # start after the scope
# or validate your conventional commit
git cc feat: added conventional commits # ok! creates a commit
git cc 'feat(cli): added a conventional commit' # ok! creates a commit
git cc feat add a typo # starts interaction at the scope
git cc -m "invalid(stuff): should return 1"
git-cc
searches for a configuration file named commit_convention.{yaml,yml,toml}
.
Note that git-cc
prefers the extension yaml
over yml
, and yml
over toml
.
git-cc
searches the following directories for a configuration file in this order:
${PWD}/
${REPO_ROOT}/ # ignored if not inside a git repo
${REPO_ROOT}/.config/ # ignored if not inside a git repo
${XDG_CONFIG_HOME}/
See ./config/commit_convention.yaml
for an example configuration file.
Figuring out what to write for an informative commit can be difficult. The conventional commits standard helps figure out what to write. As a bonus, conventional commits facilitate generating changelogs and semantic version increments. An interactive command-line application helps with following the standard.
For the details, see ./LICENSE.md.
git-cc
is source-provided software, not open-source software: it's offered under either the PolyForm Free Trial 1.0.0 license, the PolyForm Noncommercial 1.0.0 license, or a per-developer commercial license.
This means anyone can use the software for noncommercial purposes and trial the software for commercial use for a month.
Anyone using the software to make money after their trial expires needs to purchase a commercial license.
You can purchase a commercial license via a one-time GitHub sponsorship.
Prior licenses apply to previous versions of git-cc
.
-
From 2021-08-25 to 2023-11-14,
git-cc
was offered under the Indie Code Catalog Standard Deal, version 4.0.1 or higher. The licenses can be found at commitb682f27e
. IndieCC shut down, prompting relicensing. -
From 2020-11-23 to 2021-08-25,
git-cc
was licensed under the strictEq free and paid licenses. The licenses can be found at commit7ca8e95
. StrictEq rebranded to indieCC, prompting relicensing.
If you bought an indieCC or strictEq paid license, that license still grants you rights to copy and use updated versions git-cc
even after the license change.
Go to the project releases page to download the appropriate packaging format. Please verify the shasum of the downloaded executable for you before you run it.
brew tap skalt/git-cc
brew install git-cc
First, take a second to verify that the installer script would correctly check the shasum of the downloaded package. Then, run the following commands:
repo=skalt/git-cc
branch=master
curl -sL https://raw.githubusercontent.com/$repo/$branch/scripts/install.sh > /tmp/install.sh
shasum -a 256 /tmp/install.sh | sed 's/^/# /g'
# 805354a9b0db5648af785086af5a4af036d5281ea5999bda055c888186d36cd7 /tmp/install.sh
chmod +x /tmp/install.sh
/tmp/install.sh --help | sed 's/^/# /g'
# USAGE: ./install.sh [-h|--help] [--download-only|--dry-run] [FMT]
# download a release of git-cc for your OS and instruction set architecture.
#
# ARGS:
# -h|--help print this message and exit
# --download-only download as FMT, but do not install
# --dry-run print rather than follow the download url for the binary
# FMT The download format. Valid values are
# - tar.gz (default)
# - apk
# - brew
# - deb
# - exe
# - rpm
/tmp/install.sh
To compile from source, run make install
inside the source directory.
You'll need to have a go >= 1.19
toolchain and to have your $GOPATH/bin
on your $PATH
.