Files
30-seconds-of-code/git/s/commit-without-hooks.md
Angelos Chalaris 5c913d20bd Reorganize snippets
2023-05-03 21:19:02 +03:00

584 B

title, type, language, tags, cover, dateModified
title type language tags cover dateModified
Commit without running git hooks snippet git
commit
fishermen 2021-04-13T21:10:59+03:00

Creates a new commit skipping the pre-commit and commit-msg hooks.

  • Use git commit --no-verify -m <message> to commit staged changes without running git hooks.
git commit --no-verify -m <message>
# Make some changes to files, ones that your precommit hook might not allow
git add .
git commit --no-verify -m "Unsafe commit"
# Creates a commit with the message "Unsafe commit", without running git hooks