XK0-005 · Question #1639
XK0-005 Question #1639: Real Exam Question with Answer & Explanation
The correct answer is D: git rm app.conf. To delete a file from a Git repository, the administrator can use the command git rm app.conf (D). This will remove the file "app.conf" from the working directory and stage it for deletion from the repository. The administrator can then commit the change with git commit -m "Delet
Question
A systems administrator wants to delete app.conf from a Git repository. Which of the following commands will delete the file?
Options
- Agit tag app.conf
- Bgit commit app.conf
- Cgit checkout app.conf
- Dgit rm app.conf
Explanation
To delete a file from a Git repository, the administrator can use the command git rm app.conf (D). This will remove the file "app.conf" from the working directory and stage it for deletion from the repository. The administrator can then commit the change with git commit -m "Delete app.conf" to finalize the deletion. The other commands will not delete the file, but either tag, commit, or checkout the file.
Topics
Community Discussion
No community discussion yet for this question.