git pre-push hook, don't run if is --tags
问题 I have a prepush hook that tests my code, however, it also runs when I do a git push --tags . Is there any way to avoid this? Maybe there's some way to check if its a regular push or if its a --tags push? Update - These are the only arguments I was able to find: $1 is the name of the remote $2 is url to which the push is being done 回答1: I have a solution to this, but it's really kludgey. A while back, I set up a pre-commit hook to stop me from accidentally using -a when I have files staged.