LinuxCommandLibrary

git-show-branch

Show branches and their commits with relationship indicators

TLDR

Show branch relationships

$ git show-branch
copy
Show specific branches
$ git show-branch [branch1] [branch2]
copy
Show all branches
$ git show-branch --all
copy
Show with more context
$ git show-branch --more=[10]
copy
Show with color
$ git show-branch --color
copy

SYNOPSIS

git show-branch [options] [refs...]

DESCRIPTION

git show-branch displays branches and their commits with visual indicators showing which commits belong to which branches. It provides a compact overview of branch divergence and shared history.
This is useful for understanding how branches relate to each other, especially when multiple branches share common ancestors.

PARAMETERS

-a, --all

Show all refs.
-r, --remotes
Show remote branches.
--more n
Show more commits.
--list
List mode.
--topo-order
Topological order.
--date-order
Date order.
--color
Color output.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community