exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 362 discussion

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

Which command reverses the last commit without changing the index file or the working tree position?

  • A. git revert HEAD
  • B. git reset --hard HEAD~3
  • C. git reset --soft HEAD^
  • D. git revert
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
s3eed
6 months, 1 week ago
Selected Answer: C
correct
upvoted 1 times
...
rtg2123
1 year, 9 months ago
Selected Answer: C
C is correct: "git reset [<mode>] [<commit>] This form resets the current branch head to <commit> and possibly updates the index (resetting it to the tree of <commit>) and the working tree depending on <mode>. If <mode> is omitted, defaults to --mixed. The <mode> must be one of the following: --soft Does not touch the index file or the working tree at all (but resets the head to <commit>, just like all modes do). This leaves all your changed files "Changes to be committed", as git status would put it." https://git-scm.com/docs/git-reset
upvoted 4 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 ...