Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 446 Bytes

index.md

File metadata and controls

27 lines (18 loc) · 446 Bytes

git graphviz

Use graphviz tool for display

Git alias:

graphviz = !"f() { \
    echo 'digraph git {' ; git log --pretty='format:  %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; \
}; f"

Example:

git graphviz

This produces output that can be displayed using dotty.

Example:

git graphviz HEAD~100..HEAD~60 | dotty /dev/stdin

git graphviz --first-parent main | dotty /dev/stdin