Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.

Git Branches

If you need to change branches in Git, then use this command:

git checkout BRANCH_NAME

If you want to create a new branch and change to it, then add the "-b" argument like this:

git checkout b NEW_BRANCH_NAME

Before creating a new branch, you may want to check if the new branch name already exists by using this command:

git branch -a

NOTE: If you run the command without the "-a" argument, Git will only display local branches.

by Phil for Humanity
on 11/05/2012

Related Articles
 » Git Tag
 » Git Reset: Reverting Changes
 » Git Merge