Command-line interface

Visualize the git DAG.

usage: git-dag [-h] [--config-create] [--config-ignore] [-p PATH] [-f FILE]
               [-b {graphviz}] [--format FORMAT]
               [-i INIT_REFS [INIT_REFS ...]] [-R RANGE_EXPR]
               [-n MAX_NUMB_COMMITS] [-u] [-t] [-D] [-l] [-r] [-s] [-H]
               [-a ANNOTATIONS [ANNOTATIONS ...]] [--pr] [-T]
               [--trees-standalone] [-B] [--blobs-standalone]
               [-m COMMIT_MESSAGE_AS_LABEL] [-o] [--html]
               [--log-level {NOTSET,INFO,WARNING,ERROR,CRITICAL}]

Named Arguments

--config-create

Create config /home/runner/.git-dag.yml and exit.

--config-ignore

Ignore the /home/runner/.git-dag.yml config.

-p, --path

Path to a git repository.

-f, --file

Output graphviz file (e.g., /path/to/file).

-b, --dag-backend

Possible choices: graphviz

Backend DAG library.

--format

Graphviz output format (tooltips are available only with svg). If the format is set to gv, only the graphviz source file is generated.

-i, --init-refs

A list of branches, tags, git objects (commits, trees, blobs) that represents a limitation from where to display the DAG.

-R

A range expression (e.g, main..feature). It is passed directly to git rev-list, so any of its flags can be passed as well.

-n, --max-numb-commits

Max number of commits to display. If set to 0 and the -i flag is not specified, no limitations are considered whatsoever. If set to n > 0, only n commits reachable from the initial references are displayed (in the absence of user-defined initial references, the output of git rev-list –all –objects –no-object-names is used (note that it might not include some unreachable commits.

-u

Show unreachable commits.

-t

Show tags.

-D

Show deleted annotated tags.

-l

Show local branches.

-r

Show remote branches.

-s

Show stash.

-H

Show head (has effect only when -l or -r are set as well).

-a

Annotations of refs (can be passed multiple times). The first argument after each -a should be a ref. Subsequent arguments (if any) are joined and placed in the tooltip of the corresponding node.

--pr

Show pull-requests heads (most of the time this requires passing -u as well).

-T

Show trees (WARNING: should be used only with small repositories).

--trees-standalone

Show trees that don’t have parent commits reachable from a branch a tag or the reflog.

-B

Show blobs (discarded if -T is not set).

--blobs-standalone

Show blobs that don’t have parent commits reachable from a branch a tag or the reflog.

-m, --message

When greater than 0, this is the number of characters from the commit message to use as a commit label. The commit SHA is used otherwise.

-o, --xdg-open

Open output file with xdg-open.

--html

Create a standalone HTML file that embeds the generated SVG. Hass effect only when –format is svg.

--log-level

Possible choices: NOTSET, INFO, WARNING, ERROR, CRITICAL

Log level.