In this tutorial, you will configure the hook and complete a commit with an AI-generated message.
When you finish, you will know the complete happy-path workflow.
pre-commit available.Follow How to install
using the pre-commit method.
Set the model and provider values you want to use. For example:
export LITELLM_PROXY_MODEL=github_copilot/gpt-4
If your provider needs additional variables, set them now. See Configuration reference.
Edit any file in your repository, then stage the change:
git add <file>
Run:
git commit
Your editor opens with a generated commit message draft.
Check that the message matches your change intent. Adjust wording if needed, then save and close the editor.
prepare-commit-msg hook.Continue with How to use to learn repeatable daily usage.