I have a post-commit hook that does stuff in ruby. It works very well but in some cases I would like to skip the code execution when I do a git rebase or git commit --amend.
Does someone have an idea how I could not trigger the post-commit hook in these cases or any work around?
When rebasing, there’s a directory called
rebase-mergepresent in the.gitfolder. That could be an approach to disable the hook during arebase(the start of arebasebtw is indicated by thepre-rebasehook).Regarding the
--amendhowever, I can’t help you.