git branch

List, create, or delete branches

If --list is given, or if there are no non-option arguments, existing branches are listed; the current branch will be highlighted in green and marked with an asterisk. Any branches checked out in linked worktrees will be highlighted in cyan and marked with a plus sign. Option -r causes the remote-tracking branches to be listed, and option -a shows both local and remote branches.

If a pattern is given, it is used as a shell wildcard to restrict the output to matching branches. If multiple patterns are given, a branch is shown if it matches any of the patterns.

How-tos using git branch

Last modified on November 30, 2021.

Can't find a solution to your git problem?

Contact us on githint@githint.com and we will add the solution to the site