🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Branching and Merging: all 10 questions

Quiz: Branching and Merging · Question 1 of 10

Which command creates a new branch and switches to it?

Which command creates a new branch and switches to it?

  1. A.git branch new
  2. B.git switch -c new
  3. C.git merge new
  4. D.git init new
Answer & explanation

Correct answer: git switch -c new

git switch -c (or git checkout -b) creates and switches in one step.

Can you get the rest right without peeking?

Take the timed Quiz: Branching and Merging quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →