Skip to content

Instantly share code, notes, and snippets.

@leopd
Created January 3, 2020 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leopd/2a3341ae0de3a0dee0be7388df7283db to your computer and use it in GitHub Desktop.
Save leopd/2a3341ae0de3a0dee0be7388df7283db to your computer and use it in GitHub Desktop.
Git dag - visualize git graph in ascii-color
#!/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 --branches"
# 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 --branches
@leopd
Copy link
Author

leopd commented Jan 3, 2020

git dag --all is one of my most frequently-used commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment