Git · Junior · Question 54 of 75
What is git switch for compared with git checkout?
- 1It's an alias that also pushes the branch
- ✓Correct answer: It only switches branches, a safer subset of checkout
- 3It switches the remote server the repo pushes to
Explanation
checkout did two unrelated jobs: switching branches and restoring files. Git 2.23 split them into git switch and git restore to reduce mistakes.