CompTIA Linux+ (XK0-005) — Question 9

A new file was added to a main Git repository. An administrator wants to synchronize a local copy with the contents of the main repository. Which of the following commands should the administrator use for this task?

Answer options

Correct answer: B

Explanation

The correct command is 'git pull' because it fetches and merges changes from the remote repository into the local one, ensuring that the local copy is synchronized. 'git reflog' is used for tracking changes to the branches, 'git status' shows the state of the working directory and staging area, and 'git push' is for uploading local changes to the remote repository, not for syncing with it.