git branch -a
shows both remote and local branches.
git branch -r
shows remote branches.
Is there a way to list just the local branches?
1 Answer. git fetch --all and git pull -all will only track the remote branches and track local branches that track remote branches respectively. Run this command only if there are remote branches on the server which are untracked by your local branches. Thus, you can fetch all git branches.
Just git branch
without options.
From the manpage:
With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With