Switching Between Branches
Explore how to use the git checkout command to switch between existing branches and create new branches in a single step with the -b flag. Understand how changes on different branches affect your project files and how to verify your current branch using git branch.
We'll cover the following...
We'll cover the following...
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 ...