Run the following command to setup the prepare-commit-msg git hook with the pre-install framework. This should prompt you to override the existing .git/hook/prepare-commit-msg if it already exists
> git_ai_commit hook --setup
Attempt to remove .git/hook/prepare-commit-msg
> git_ai_commit hook --remove
Do setup again
> git_ai_commit hook --setup
Attempt to commit a change from git cli, observe AI generated commit message if there is on user provided commit message
# expect an AI-generated commit message
git commit
# the given message should be used for the commit
git commit -m "user provided commit message"
Description
Introduce a set of commands that programmatically set the
prepare-commit-msg
hook script without using thepre-commit
frameworkTest Plan
build and install for latest changes. FYI, the
pre-commit install
step will overwrite the.git/hook/prepare-commit-msg
Run the following command to setup the prepare-commit-msg git hook with the pre-install framework. This should prompt you to override the existing
.git/hook/prepare-commit-msg
if it already existsAttempt to remove
.git/hook/prepare-commit-msg
Do setup again
Attempt to commit a change from git cli, observe AI generated commit message if there is on user provided commit message
Follow up