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