exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 8 question 50 discussion

Actual exam question from Microsoft's AZ-400
Question #: 50
Topic #: 8
[All AZ-400 Questions]

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?

  • A. --squash
  • B. --no-verify
  • C. --message ''
  • D. --no-post-rewrite
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
vsvaid
11 months, 2 weeks ago
Selected Answer: B
Correct answer, I believe all the git hooks can be bypassed by --no-verify option
upvoted 3 times
...
yana_b
1 year, 4 months ago
Selected Answer: B
Correct answer
upvoted 1 times
...
xRiot007
1 year, 4 months ago
"You need to make a commit that does not have a work item tag" - Why ? This sounds to me like bad practice. Any work item, bug, hotfix, release, or whatever other sort of task should be traced back into the backlog. To do this, you need a work item on that backlog.
upvoted 2 times
...
zellck
1 year, 6 months ago
Selected Answer: B
B is the answer. https://git-scm.com/docs/githooks#_commit_msg This hook is invoked by git-commit[1] and git-merge[1], and can be bypassed with the --no-verify option. It takes a single parameter, the name of the file that holds the proposed commit log message. Exiting with a non-zero status causes the command to abort.
upvoted 2 times
...
Madbo
1 year, 7 months ago
The correct answer is B. The --no-verify parameter can be used with the git commit command to skip the Git hook that was created on the commit-msg event. This allows you to make a commit without the required custom work item tag.
upvoted 3 times
...
Eltooth
2 years, 6 months ago
Selected Answer: B
B is correct answer. This hook is invoked by git-commit[1] and git-merge[1], and can be bypassed with the --no-verify option. It takes a single parameter, the name of the file that holds the proposed commit log message. Exiting with a non-zero status causes the command to abort. The hook is allowed to edit the message file in place, and can be used to normalize the message into some project standard format. It can also be used to refuse the commit after inspecting the message file. https://git-scm.com/docs/githooks#_commit_msg
upvoted 4 times
...
Pandur1
2 years, 7 months ago
-no-verify seems correct
upvoted 3 times
...
jay158
2 years, 7 months ago
Selected Answer: B
https://git-scm.com/docs/githooks
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...