Command

git branch

List, create or rename local branch references. Creation alone does not activate the branch. Rename does not alter commit contents or update a remote.

Formal Syntax & Structure

git syntaxgit
git branch [--list] | git branch NAME | git branch -m OLD NEW

Working Example

Example Snippetgit
git branch -m draft documentation
Git Reference