git branch

Lists, creates, renames, or deletes branches. Branches are lightweight pointers to commits.

Syntax

git
git branch [name]
git branch -d [name]
git branch -m [old] [new]

Example

git
git branch                   # list local branches
git branch feature/login     # create new branch
git branch -d feature/login  # delete merged branch
git branch -D feature/login  # force delete
git branch -m old-name new-name