Git Cheat Sheet/List all branches

Show local and remote-tracking branches.

Section: Branching and Switching

List all branches

bash
bash
git branch -a

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Branching and Switching
List branches with last commit
Include tracking and latest commit info.
OpenIn sheetbashsame section
Create branch
Create a branch at current HEAD.
OpenIn sheetbashsame section
Create and switch branch
Create and switch in one step.
OpenIn sheetbashsame section
Switch branches
Switch to an existing branch.
OpenIn sheetbashsame section
Rename current branch
Rename current branch.
OpenIn sheetbashsame section
Delete merged branch
Delete a merged local branch.
OpenIn sheetbashsame section