ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 235 - XK0-005 discussion

Report
Export

A systems administrator wants to delete app . conf from a Git repository. Which of the following commands will delete the file?

A.
git tag app. conf
Answers
A.
git tag app. conf
B.
git commit app . conf
Answers
B.
git commit app . conf
C.
git checkout app . conf
Answers
C.
git checkout app . conf
D.
git rm app. conf
Answers
D.
git rm app. conf
Suggested answer: D

Explanation:

To delete a file from a Git repository, the administrator can use the commandgit 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 withgit 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.Reference:

[CompTIA Linux+ Study Guide], Chapter 10: Working with Git, Section: Deleting Files with Git

[How to Delete Files from Git]

asked 02/10/2024
P. Kriek
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first