Before you perform actions on your branches in your Git repository, it’s important to know which branch you’re targeting. If you aren’t using a Git GUI, like GitKraken, to visualize your work, it’s likely you won’t be able to remember the names of each local branch, especially in a large Git repository.
To view a list of your local Git branches, you can run
at any point during your workflow.
To view a list of your remote Git branches, you can run
git branch -r
when working with remote branches in your Git repository.
Originally published at https://gitkraken.com.