CompTIA Linux+ (XK0-004) — Question 235

A Linux team is using Git to version a set of custom scripts. A team member has made an update to a script and published the changes to the repository.
Which of the following is the BEST way to retrieve the latest changes to the administrator's local working copy?

Answer options

Correct answer: D

Explanation

The correct answer is 'git pull' because it not only fetches the latest changes from the remote repository but also automatically merges them into the local branch. 'git fetch' only retrieves the updates without merging, 'git merge' requires a separate fetch beforehand, and 'git commit' is used to save local changes, not to retrieve updates.