We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Switching Branches

We talked about using git switch to change branches. There's another command that you'll certainly run into because it's been around for a long time and older developers are used to it: git checkout. git switch is a newer command that is meant to be more intuitive and user-friendly. It's recommended to use git switch over git checkout for simply switching branches.

To switch to a branch called prime:

git switch prime

# or, the old way:
git checkout prime

For this course, we will stick to git switch.

Assignment

Run and submit the CLI tests.