CompTIA Linux+ (XK0-004) — Question 227

A Linux administrator needs to update a script that is stored in the team's Git repository.
After the administrator clones the repository, which of the following is the BEST method to ensure merging changes in the future will not overwrite other users' commits to the repository?

Answer options

Correct answer: D

Explanation

Creating a new branch allows the administrator to make changes without affecting the main codebase, thus preventing overwriting others' commits. The other options either create separate repositories or folders, or involve committing directly to the master branch, both of which can lead to conflicts and loss of collaborative work.