Thuta Learning
Git
IntermediateDevOps & ToolsBeginner

git switch

GitLesson 12

git switch (modern) or git checkout (traditional) is used to move between branches.

bash
# Switch to the 'new-feature' branch
git switch new-feature

# To create and switch to a new branch at the same time
git switch -c another-feature
You should see
Switched to branch 'new-feature'

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.