exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 175 discussion

Actual exam question from CompTIA's XK0-004
Question #: 175
Topic #: 1
[All XK0-004 Questions]

An issue was discovered on a testing branch of a Git repository. A file was inadvertently modified and needs to be reverted to the master branch version. Which of the following is the BEST option to resolve the issue?

  • A. git branch -b master file
  • B. git merge master testing
  • C. git stash branch master
  • D. git checkout master -- file
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Reference:
https://www.git-scm.com/book/en/v2/Git-Basics-Undoing-Things

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
DiaaEmara
2 years, 5 months ago
https://ebazhanov.github.io/linkedin-skill-assessments-quizzes/git/git-quiz.html
upvoted 2 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