Git · Junior · Question 19 of 75
How do you create a branch and switch to it in one command?
- ✓Correct answer:
git switch -c feature - 2
git commit -b feature - 3
git branch --go feature
Explanation
git switch -c (or the older git checkout -b) creates the branch at the current commit and switches to it. git branch feature alone only creates it.