echo 'digraph "git" {' > enb.dot git log --pretty='format: %h [label="%s"]' HEAD^^..HEAD | perl -p -e 's/([0-9a-f]{7})/"\1"/' >> enb.dot #git log --pretty='format: %h [label="Subject:Testing%h"]' HEAD^^..HEAD | sed 's/[0-9a-f]\+/\"&\"/' >> enb.dot git log --pretty='format: %h -> { %p }' HEAD^^..HEAD | sed 's/[0-9a-f]\+/\"&\"/g' >> enb.dot #git log --pretty='format: %p -> { %h }' HEAD^^..HEAD | sed 's/[0-9a-f]\+/\"&\"/g' >> enb.dot ##reverse arrow echo '}' >> enb.dot dot -Tsvg enb.dot -o enb.svg
The Result: