Skip to content

Instantly share code, notes, and snippets.

@dragonken
Last active June 16, 2023 13:24
Show Gist options
  • Save dragonken/f640d98cd08737ccca7737909998e840 to your computer and use it in GitHub Desktop.
Save dragonken/f640d98cd08737ccca7737909998e840 to your computer and use it in GitHub Desktop.
Add git config
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html
git config --global alias.lg1 "log --graph --abbrev-commit --decorate --date=relative --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"
git config --global alias.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"
git config --global alias.lg \!"git lg1"
git config --global alias.co "checkout"
git config --global alias.br "branch"
git config --global alias.st "status"
git config --global core.pager "less -FX"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment