git branch <branchname>

Copy current branch as a new branch

git branch creates a new branch with the name you specify. However, it doesn't switch you to that branch; it only creates it. To switch to your new branch, you would use git checkout.

If you want to create a new branch and switch to it at the same time, you can use:

git checkout -b <branchname>
Specific examples:
git branch refactor-homepage

Sign in to enable bookmarking, reminders, progress-tracking and more...