Skip to content

Instantly share code, notes, and snippets.

@leopd
Created January 3, 2020 20:05
Show Gist options
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment