How you can see list of all branches in Git?
Use the git branch command. The current branch is marked with a star.
Terminal output
$ git branch
develop
feature-login
* main
| Command | What it shows |
|---|---|
git branch | Only local branches |
git branch -r | Only remote branches |
git branch -a | Local and remote branches |
git branch -v | Branches with their last commit |
git branch --show-current | Name of the current branch only |
See Git Branch for more.
Learn more about the similar topics:
| Tutorials |
|---|
| Git Branch |
| Git Checkout and Switch |
| Git Merge |
| Git Merge Conflict |
| Git Rebase |
| Git Cherry Pick |
| Git Branching Strategy |