Last active
March 7, 2025 08:30
-
-
Save BibMartin/3d8bc449ca2f93d4cf90 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
git config --global alias.lola "log --graph --decorate --pretty=oneline --abbrev-commit --all" |
So, this could be a good option:
git config --global alias.lola "log --graph --decorate --pretty='format:%C(auto)%h %d %s %C(green)%an%C(bold blue) %ad' --abbrev-commit --all --date=relative"
It works very well for me.
Yep. I've since tweaked my to:
git config --global alias.lola "log --graph --pretty='format:%C(auto)%h %d %s %C(green)(%ad) %C(bold blue)<%an>' --abbrev-commit --all --date=relative"
and this one, excluding the --all
git config --global alias.lol "log --graph --pretty='format:%C(auto)%h %d %s %C(green)(%ad) %C(bold blue)<%an>' --abbrev-commit --date=relative"
git config --global alias.lola "log --graph --decorate --pretty='format:%C(auto)%h %d %s %C(green)%an%C(bold blue) %ad' --abbrev-commit --all --date=relative"
So good.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this might do what you want. You can of course change the color, remove the date (%ad), or change the date format (--date) to match what you want. The format specifiers are documented at https://git-scm.com/docs/git-log#_pretty_formats.
git log --graph --pretty='format:%C(auto)%h %d %s %C(green)%an%C(bold blue) %ad' --all --date=relative
The
%an
format specifier is for the author name (%cn
would be the committer name).