exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 512 discussion

Actual exam question from Cisco's 200-901
Question #: 512
Topic #: 1
[All 200-901 Questions]

A developer is working on a branch called topic that was created from the master branch to add a new feature to the product. After making a few commits on the branch, the developer wants to compare the changes between the topic and the master branches. Which two Git commands are used? (Choose two.)

  • A. git diff topic - -cached
  • B. git diff topic…master
  • C. git diff topic HEAD
  • D. git diff topic-master
  • E. git diff topic master
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

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
RonAdams
Highly Voted 5 months, 2 weeks ago
Selected Answer: BE
B and E are correct. B. git diff topic...master - This command compares the changes between the common ancestor of the two branches (usually where they diverged) and the tip of each branch. E. git diff topic master - This command compares the changes between the tips of the two branches directly.
upvoted 6 times
...
peterbuza
Highly Voted 11 months ago
Selected Answer: CE
git diff [<options>] [--merge-base] <commit> [--] [<path>…​] This form is to view the changes you have in your working tree relative to the named <commit>. You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch.
upvoted 5 times
daniii89
3 months, 1 week ago
HEAD refers to the current branch’s latest commit, so this would compare topic with itself or an unrelated commit.
upvoted 1 times
...
...
daniii89
Most Recent 3 months, 1 week ago
Selected Answer: BE
Its BE, correct
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago