Last active
August 9, 2024 13:43
-
-
Save jessesquires/d0f3fc99be8208394a450ce86443ce7d to your computer and use it in GitHub Desktop.
git "smartlog" / "pretty log"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# blog post | |
# | |
# https://www.jessesquires.com/blog/customizing-git-log/ | |
git log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset' |
It's beautiful!
FWIW, I've been living off this one for a while, which I think I got on SO:
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%Cblue%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
It's one line per commit, with tags, commuter name, graph structure, and colorization.
Thank you <3
thanks and this is what I search for every time i setup a new devserver
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Screenshot for those interested