...

/

Switching Between Branches

Switching Between Branches

Learn how Git allows us to quickly switch between different branches. This lesson also discusses an alternative way to create a new branch with Git.

The git checkout command

Using the git branch command lets us create new branches seamlessly. However, the problem is that even though we get to create new branches, we still don’t actually know how to switch over to those branches and use them. The git checkout command lets us do just that.

Once you create a new branch (let’s call it new_branch), use the following command while still currently on the master branch, to switch over to that new branch:

git
...