Cheatsheet Pages / Git Cheatsheet

How to list all branches in Git, local and remote — git branch -a / -vv

You lost track of which branches exist locally and which ones track a remote.

git branch -a    # all local + remote branches
git branch -vv   # verbose: upstream + last commit per branch

Good to know

See all branches and which one you are on; -vv also shows upstream tracking.

Git Cheatsheet one-page card — 30 daily and rescue commands
The full one-page card — Git Cheatsheet. Get the complete cheatsheet on GitHub