Quickstart¶
After installing git-dag
, one can create a configuration file [1] using
~/.git-dag.yml
¶git dag --config-create
Parameters are organized in sections:
public
contains most command-line argumentsdag_node_colors
: node colorsdag_global
global attributes of the DAGdag_node
: node attributesdag_edge
: edge attributes
The user can define arbitrary parameters in the latter three section, which are passed to the graph backend (currently only graphviz is supported).
There is no need to keep all parameters in the config file (any of them can be deleted).
The default values of missing parameters are defined in the git_dag.parameters
module. Command-line arguments take precedence over parameters in the config file.
Generate a DAG¶
Assuming that we are in a folder with a git repository, running
git dag -lrstH -n 500
would generate git-dag.gv
(a graphviz dot file) and git-dag.gv.svg
containing a
DAG with the 500 most recent commits, including:
-l
local branches-r
remote branches-s
stashes-t
tags-H
HEAD
Setting -n 0
would include all commits (even unreachable ones if -u
is passed as
well). Trees and blobs can be displayed using -T
and -B
(this is recommended
only for small repositories).
See the examples section.