nerdexam
CiscoCisco

200-901 · Question #472

200-901 Question #472: Real Exam Question with Answer & Explanation

The correct answer is A: git branch. The two commands that create a new branch in a Git repository are: git branch <mynewbranch>: This command creates a new branch named <mynewbranch> but does not switch to it immediately. You need to use a separate command to switch to the newly git checkout -b <mynewbranch>: This

Software Development and Design

Question

Which two commands create a new branch in a Git repository? (Choose two.)

Options

  • Agit branch
  • Bgit checkout
  • Cgit checkout
  • Dgit branch
  • Egit checkout -b

Explanation

The two commands that create a new branch in a Git repository are: git branch <mynewbranch>: This command creates a new branch named <mynewbranch> but does not switch to it immediately. You need to use a separate command to switch to the newly git checkout -b <mynewbranch>: This command creates a new branch named <mynewbranch> and immediately switches to it. It is a shortcut for creating and checking out a new branch in a

Topics

#Git#Branching#Version Control#CLI

Community Discussion

No community discussion yet for this question.

Full 200-901 PracticeBrowse All 200-901 Questions