// create and checkout new branch in one line git checkout -b new_branch
$ git checkout -b <branch_name>
# In modern versions of Git, you can checkout the remote branch like a local branch. git checkout <remotebranch> # Older versions of Git require the creation of a new branch based on the remote. git checkout <remotebranch> origin/<remotebranch>
$ git checkout -b myfeature dev
git checkout -b origin/branch-name git checkout -b branch-name
git checkout -b <new-branch>
truelover@PEACE project % git checkout master truelover@PEACE project % git checkout branch_name #create branch truelover@PEACE project % git checkout -b new_branch_name
$ git checkout -b new-branch --track origin/develop