Last active
March 24, 2026 17:59
-
-
Save leopd/2a3341ae0de3a0dee0be7388df7283db to your computer and use it in GitHub Desktop.
Git dag - visualize git graph in ascii-color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| git config --global alias.dag "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative" | |
| # This adds a line to ~/.gitconfig like | |
| # [alias] | |
| # dag = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative |
Author
Author
Take out --branches for "newer" versions of git. (Which? IDK.) In newer versions of git it is equivalent to --all.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git dag --allis one of my most frequently-used commands.