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
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
Community Discussion
No community discussion yet for this question.