Skip to content

Instantly share code, notes, and snippets.

@fromSmolsoft
Forked from niun/set-pretty-git-log-alias.sh
Created December 12, 2024 11:22
Show Gist options
  • Save fromSmolsoft/1fab2cecf3651346bc926c78b1a08c40 to your computer and use it in GitHub Desktop.
Save fromSmolsoft/1fab2cecf3651346bc926c78b1a08c40 to your computer and use it in GitHub Desktop.
git log graph --oneline with date and author and colored ref names as alias
git log --graph --branches --remotes --tags --oneline --decorate
git log --all --graph --pretty=format:'%C(auto)%h -%d %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'
git log --all --graph --pretty=format:"%ad %C(yellow)%h%Creset %s %Cblue[%an]" --date="format-local:%a %Y-%m-%d %H:%M
git log --all --graph --pretty=format:'%C(auto)%h%d %s %C(bold black)(%ar by <%aN>)%Creset'
# declare "git la" (log graph all) alias with
git config --global alias.la "log --all --graph --pretty=format:'%C(auto)%h%d %s %C(bold black)(%ar by <%aN>)%Creset'"
# declare "git lad" (log graph all exact date) alias with
git config --global alias.lad "log --all --graph --pretty=format:'%Cgreen%ad%Creset %C(auto)%h%d %s %C(bold black)<%aN>%Creset' --date=format-local:'%Y-%m-%d %H:%M (%a)'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment