Changing Branches
Changing branches requires the use of Git's tool for moving around the version history timeline, the checkout sub command. The checkout sub command quite literally lets you check out what's happening in another branch or commit. It will alter all of your files in your working directory to be the versions present on the commit or branch you are checking out, so you'll want to stash or commit any changes in your working directory before you use it (don't worry about losing stuff accidentally, Git will warn you).
To switch to a branch that already exists, just specify the branch name like this:
git checkout branch-name-here
If you are trying to make a new branch from the commit you are currently positioned on, you can use the -b flag to change to make a new branch while switching to it (it will use your current commit as the base it is branching from):
git checkout -b new-branch-name
No comments to display
No comments to display