nerdexam
CompTIACompTIA

XK0-005 · Question #1278

XK0-005 Question #1278: Real Exam Question with Answer & Explanation

The correct answer is D: branch. After cloning a remote repository, the first Git operation to run when starting development on a new feature is to create a new branch. This ensures that feature work is isolated from the main codebase.

System Management

Question

After cloning a remote repository, a new feature of that project needs to be developed and integrated into the next major release. Which of the following is the first Git operation to run to begin working on this new feature immediately after the clone?

Options

  • Amerge
  • Binit
  • Cdiff
  • Dbranch

Explanation

After cloning a remote repository, the first Git operation to run when starting development on a new feature is to create a new branch. This ensures that feature work is isolated from the main codebase.

Common mistakes.

  • A. git merge is used to combine changes from one branch into another, a step performed after a feature is developed, not at the beginning.
  • B. git init initializes a new Git repository; a repository that has just been cloned is already initialized.
  • C. git diff displays the differences between commits, branches, or the working directory, and is used for reviewing changes, not for starting new feature development.

Concept tested. Git branching for feature development

Reference. https://git-scm.com/docs/git-branch

Topics

#Git#Version Control#Branching#Git Workflow

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions