nerdexam
CompTIA

XK0-004 · Question #346

An administrator clones a Git repository onto a local laptop. While inspecting the code, the administrator notices a bug and wants to fix it. Which of the following is the BEST command for the…

The correct answer is B. Branch. git branch [branch name] / git branch -d [branch name] → Git branches allow users to create several different work areas within the same repo. In a professional environment, it is very common to create a new branch whenever you wish to make several changes to a project or to…

Scripting, Containers and Automation

Question

An administrator clones a Git repository onto a local laptop. While inspecting the code, the administrator notices a bug and wants to fix it. Which of the following is the BEST command for the administrator to use to test a patch for the script prior to updating the version saved in master?

Options

  • AInit
  • BBranch
  • CStash
  • DComit
  • Emerge

How the community answered

(15 responses)
  • B
    87% (13)
  • D
    7% (1)
  • E
    7% (1)

Explanation

git branch [branch name] / git branch -d [branch name] → Git branches allow users to create several different work areas within the same repo. In a professional environment, it is very common to create a new branch whenever you wish to make several changes to a project or to fix a bug, and then merge that branch back into the master branch when we’re done.

Topics

#Git#branching#version control#patch testing

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice