Forrest logo
back to the git tool

git-branch:tldr:470eb

git-branch: List all branches (local and remote; the current branch is highlighted by `*`).
$ git branch --all
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the git tool