If a client-side commit-msg Git hook enforces a work item tag in commit messages, which git commit option allows you to make a commit without running the hook?
Choose an answer
Tap an option to check your answer.
Correct answer: --no-verify.
Why this is the answer
The git commit --no-verify command bypasses the pre-commit and commit-msg client-side Git hooks. This is useful when you need to make a commit quickly without adhering to a hook's enforcement, such as when fixing a build or making a temporary commit. -squash is used with git merge or git rebase to combine multiple commits into a single commit. -message '' or -m '' is used to provide a commit message directly on the command line, but it does not bypass hooks. -no-post-rewrite prevents the post-rewrite hook from running after commands that rewrite history (like git commit --amend or git rebase), but it does not affect the commit-msg hook.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed