The git branch command lists branch names found in the repository:
$ git branch
bug/pr-1
dev
* master
In this example, three topic branches are shown. The branch
currently checked out into your working tree is identified by the
asterisk. This example also shows two other branches,
bug/pr-1
and dev
.
Without additional parameters, only topic branches in the
repository are listed. As you’ll see in Chapter 11, there may be additional remote
tracking branches in your repository. You can list those with the -r
option.
You can list both topic and remote branches with
-a
.
18.218.250.247