Open k0286 opened 8 months ago
@k0286 CodeGPT already have git prepare-commit-msg hook built-in.
Just try codegpt hook install
to install the hook.
Can you describe more about your requirements? I don't really get what you want.
Thx for your replay.
E.g. I don't want to codegpt been triggered when running git rebase
.
But If the prepare-commit-msg hook is intstalled, I don't have any option to disable it except uninstall the hook.
Reference from this: https://stackoverflow.com/a/57590865/910074
git rebase
runs pre-rebase
and post-rewrite
hooks. Are you sure your git rebase
will trigger prepare-commit-msg
hook?
Reference from this: https://stackoverflow.com/a/57590865/910074
git rebase
runspre-rebase
andpost-rewrite
hooks. Are you sure yourgit rebase
will triggerprepare-commit-msg
hook?
Of course, if you met the conflicts when doing rebase process.
I got your point now.
So why do you want to trigger the git pre-commit hook
when running codegpt commit
? I don't understand why you have to run codegpt commit
during git rebase
if there is a conflict happen.
Yeah, you are right. I actually don't want to codegpt commit
been triggered during I'm solving the conflicts. But It triggers if the codegpt commit hook
is installed. There are no options to bypass the prepre-commit-message
hook, right?
@appleboy Do you have any idea?
Hi,
I hope the
codegpt commit
can trigger the git pre-commit hook, before generate the commit message.I know I can install the prepare-commit-hook to the project. But I don't want to use codegpt for every commit.
So I prefer to use
codegpt commit
when it's needed.感謝!