git-branch is the Git command that manages branches.
git branch is the command that manages branches within a Git repository.
The default branch is called
To create a new branch:
git branch <branch-name>
To see a list of all branches in the current repository:
Switching to another branch:
git checkout <branch-name>
Creating a new branch and switch to it in one step:
git checkout -b <branch-name>
Deleting a branch:
git branch -d <branch-name>
Create a branch with the changes from the current branch:
git stash git stash branch <branch-name>
More information on
git-branch manual page.