git log(1) --all --graph --decorate --oneline --simplify-by-decoration
Show commit logs
--all
    Pretend as if all the refs in refs/ are listed on the command line as <commit>.
--graph
    Draw a text-based graphical representation of the commit history on the left hand side of the output.
    This may cause extra lines to be printed in between commits, in order for the graph history to be
    drawn properly.

    This enables parent rewriting, see History Simplification below.

    This implies the --topo-order option by default, but the --date-order option may also be specified.
--no-decorate, --decorate[=short|full|no]
    Print out the ref names of any commits that are shown. If short is specified, the ref name prefixes
    refs/heads/, refs/tags/ and refs/remotes/ will not be printed. If full is specified, the full ref
    name (including prefix) will be printed. The default option is short.
--oneline
    This is a shorthand for "--pretty=oneline --abbrev-commit" used together.
--simplify-by-decoration
    Commits that are referred by some branch or tag are selected.

Note that extra commits can be shown to give a meaningful history.

The following options affect the way the simplification is performed:

Default mode
    Simplifies the history to the simplest history explaining the final state of the tree. Simplest
    because it prunes some side branches if the end result is the same (i.e. merging branches with the
    same content)
source manpages: git-log