Git post commit: skip –amend and rebase
I have a post-commit hook that does stuff un ruby. It works very well but in some cases I would like to skip the code execution when I do a rebase or when I do a commit –amend.
Does someone have an idea how I could not trigger the post-commit hook in these cases or any work around?
- SVN hook mailer.py configuration
- How do I make Subversion (SVN) send email on checkins?
- Can I trigger a git hook after a commit from Gitlab web editor?
- Post commit hook problem for
- How to mock a post commit hook in github, for a repo that is not owned
- For every commit, create an equivalent compiled commit in a separate repo or branch
One Solution collect form web for “Git post commit: skip –amend and rebase”
When rebasing, there’s a directory called
rebase-merge present in the
.git folder. That could be an approach to disable the hook during a
rebase (the start of a
rebase btw is indicated by the
--amend however, I can’t help you.