Git · Junior · Question 54 of 75

What is git switch for compared with git checkout?

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.

Further reading

Problem with a question

Git · Junior · question 54

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz