How to List All Remote Branches in Git
This short guide will show you how to list all remote branches in Git. Visit this guide for steps on how to check out a remote branch.
Posted in these interests:
This short guide will show you how to list all remote branches in Git. Visit this guide for steps on how to check out a remote branch.
In your repo directory, type:
git branch -a
This will render a list of all available remote branches. The -a
flag means "all".
To learn more about git branch and its available flags and options, see the git branch documentation.
Sometimes we start writing code without managing our branches in advance. Then we make commits in master (or some other base branch) when we intended to carve off a new feature branch.