nerdexam
CompTIACompTIA

XK0-005 · Question #283

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

The correct answer is D: branch. After cloning a Git repository, the first operation to begin developing a new feature is to create a new branch, which isolates the new work from the main development line. This allows independent development without affecting the main or master branch until the feature is comple

Scripting, Containers, and Automation

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 Git repository, the first operation to begin developing a new feature is to create a new branch, which isolates the new work from the main development line. This allows independent development without affecting the main or master branch until the feature is complete.

Common mistakes.

  • A. git merge is used to combine changes from one branch into another, which is done after development on a feature branch is complete, not as the first step.
  • B. git init initializes a new Git repository, but the repository has already been initialized and cloned, so this command is unnecessary.
  • C. git diff shows changes between commits, working tree, or index, which is for reviewing code, not for initiating new development work.

Concept tested. Git branching workflow for new features

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