Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 123
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?
Answer options
- A. git -a README.md
- B. git add README.md
- C. git add README.md staging
- D. git commit README.md
Correct answer: B
Explanation
The correct command is 'git add README.md' because it stages the specified file for the next commit. The other options are incorrect; 'git -a README.md' is not a valid command, 'git add README.md staging' is improperly structured, and 'git commit README.md' attempts to commit without staging first.