exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 25 discussion

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

A developer needs to prepare the file README.md in the working tree for the next commit operation using Git. Which command needs to be used to accomplish this?

  • A. git -a README.md
  • B. git add README.md
  • C. git add README.md staging
  • D. git commit README.md
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
wqmppds
Highly Voted 3 years, 4 months ago
B is correct
upvoted 6 times
...
herrmann69
Most Recent 10 months, 1 week ago
Selected Answer: B
B is correct Possible answers: A. git -a README.md "git -a" is invalid B. git add README.md "prepares" the file "README.md" by moving it from the local workspace to the staging area (index) C. git add README.md staging same as B, but would also try to add the file "staging" to the staging area, which will result in an error if the file does not exist D. git commit README.md moves the file "README.md" directly from the local workspace to the local repository
upvoted 2 times
...
macxsz
2 years, 6 months ago
Selected Answer: B
Only B and D make sense. D does not "prepare" the file, only commits it. So answer should be B
upvoted 1 times
...
designated
2 years, 9 months ago
Selected Answer: B
B is correct: git add README.md then git commit -m "updated read me"
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 ...