Intro: I recently installed some software which fires on the git pre-push
hook. Unfortunately there is a mistake in the software, and it crashes on very large commits.
git push
without triggering the githooks?That way I don't have to uninstall the githook?
Quick tip if you want to skip the pre-commit validations and quickly want to get a commit out there. To get your commit through without running that pre-commit hook, use the --no-verify option. Voila, without pre-commit hooks running!
Use git commit --no-verify -m <message> to commit staged changes without running git hooks.
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.
After reading through some of the githook documentation I found that the pre-commit
hook could be omitted with the flag --no-verify
.
Although it was not mentioned, --no-verify
also works on git push
:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With