Skip to content

Instantly share code, notes, and snippets.

@srafay
Created January 20, 2020 07:24
Show Gist options
  • Save srafay/4a2ba5317ef17c474d3ce9b33a520d0b to your computer and use it in GitHub Desktop.
Save srafay/4a2ba5317ef17c474d3ce9b33a520d0b to your computer and use it in GitHub Desktop.
Alias for Git
Log commits on terminal:
git config --global alias.tree log --pretty="%C(Yellow)%h %C(reset)%ad (%C(Green)%cr%C(reset))%x09 %C(Cyan)%an: %C(reset)%s" --date=short --graph --abbrev-commit
Log branch commits:
git config --global alias.branchtree log --pretty="%C(Yellow)%h %C(reset)%ad (%C(Green)%cr%C(reset))%x09 %C(Cyan)%an: %C(reset)%s" --date=short --graph --abbrev-commit --first-parent --no-merges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment