Skip to content

Instantly share code, notes, and snippets.

@jomoespe
Created March 17, 2022 15:57
Show Gist options
  • Save jomoespe/e263d6e1eed0d4e0ecfa1bea5ed7e2a6 to your computer and use it in GitHub Desktop.
Save jomoespe/e263d6e1eed0d4e0ecfa1bea5ed7e2a6 to your computer and use it in GitHub Desktop.
# Alias to show git log with nice format.
# then you can:
# $ git lg | lg1
# $ git lg2
# To show the log
# based on: https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment