This project makes it easy to use the github cli to generate commit messages using copilot and conventional commits
- gh CLI - Installation Instructions
- jq CLI
-
Once you have installed gh. You will need to authorize with
gh auth login --web. -
Then clone this repo or copy
git-commit.shin your path. -
For easier access add an alias to your shell, example:
gc() { <path-to-repo>/git-commit.sh $@ }
-
In another repo add files to be staged with
git add . -
run
gcto generate commit message of your staged files and open up in your editor (fallsback to nvim)
You can also run gc --echo to view the git commit command instead
of running to view the message
Note
This script uses jq and your token from gh auth token
to make api calls directly to copilot and may break as it
is undocumented