![Forrest logo](/images/logo.png)
git-branch:tldr:470eb
The command "git branch --all" is used to list all the branches in a Git repository, both local and remote branches. When you run this command, Git will show you a list of all the branches in your repository, including the branches that are stored locally on your machine and the branches that exist in the remote repositories. The branches that exist in remote repositories will be prefixed with the name of the remote repository followed by a forward slash ("/"). Here is an example output of the "git branch --all" command: master feature/branch1 feature/branch2 remotes/origin/master remotes/origin/feature/branch1 remotes/origin/feature/branch2 In this example, "master", "feature/branch1", and "feature/branch2" are the local branches, while "remotes/origin/master", "remotes/origin/feature/branch1", and "remotes/origin/feature/branch2" are the remote branches.