Frequently asked questions for git and git workflows.

How do I create a branch?

git branch <branch>      # just creates a branch off the current sha
git checkout <branch>    # actually moves to the branch

This can be simplified to:

git checkout -b <branch> # branches and moves to the branch in one command

Share