exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 379 discussion

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

A developer must apply a new feature on a live project. After the commit, it was discovered that the wrong file was applied. The developer must undo the single commit and apply the file with the name feat-EXP453928854DPS. Which command must the developer use?

  • A. git clean
  • B. git checkout
  • C. git revert
  • D. git reset
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
1a63556
11 months ago
Selected Answer: C
C. git revert In this case, the developer would want to use the `git revert` command. This command creates a new commit that undoes the changes made in the previous commit. This is a safe way to undo changes, as it doesn't alter the existing history. The `git reset` command does undo changes, but it does so by discarding commits in a way that is potentially unsafe, as you can lose changes permanently. The `git checkout` command is used to switch branches or restore working tree files, among its other uses. The `git clean` command is used to remove untracked files from the working directory.
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 ...