nerdexam
Microsoft

AZ-400 · Question #309

You are using GitHub as a source code repository. You create a client-side Git hook on the commit-msg event. The hook requires that each commit message contain a custom work item tag. You need to make

The correct answer is B. --no-verify. The commit-msg hook is invoked by git-commit and git-merge, and can be bypassed with the -- no-verify option. https://git-scm.com/docs/githooks

Submitted by amina.ke· Mar 6, 2026Design and implement source control

Question

You are using GitHub as a source code repository. You create a client-side Git hook on the commit-msg event. The hook requires that each commit message contain a custom work item tag. You need to make a commit that does not have a work item tag. Which git commit parameter should you use?

Options

  • A--squash
  • B--no-verify
  • C--message ''
  • D--no-post-rewrite

How the community answered

(38 responses)
  • A
    5% (2)
  • B
    89% (34)
  • C
    3% (1)
  • D
    3% (1)

Explanation

The commit-msg hook is invoked by git-commit and git-merge, and can be bypassed with the -- no-verify option. https://git-scm.com/docs/githooks

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice