DEV Community

Cover image for Git log pretty print aliases
Austin Cunningham
Austin Cunningham

Posted on

2 1

Git log pretty print aliases

A couple of git aliases for git log pretty print. Add them to your .zshrc or .bashrc for usage and source the file e.g.source ~/.zshrc, or restart your terminal for the changes to apply.

gitp - pretty print the last 10 logs

#Print latest 10 submit logs
alias gitp="git log --pretty=format:'%C(yellow)%h %Cred%ad  %Creset%s' --date=local --max-count=10"
# Usage
gitp
Enter fullscreen mode Exit fullscreen mode

Alt Text

gitpp - pretty print all logs

#Print latest all submit logs
alias gitpp="git log --pretty=format:'%C(yellow)%h %Cred%ad  %Creset%s' --date=local"
#Usage
gitpp
Enter fullscreen mode Exit fullscreen mode

Output the same as gitp but not limited to 10 commits

gitpa - pretty print include author

# Include author
alias gitpa="git log --pretty=format:'%C(yellow)%h %<(24)%C(red)%ad %<(18)%C(green)%an %C(reset)%s' --date=local --max-count=10"
# Usage
gitpa
Enter fullscreen mode Exit fullscreen mode

Alt Text

gitag - pretty print tags

#Print log information on tags
alias gitag="git log --no-walk --tags --pretty=format:' %C(yellow)%h %Cgreen%d  %Cred%ad  %Creset%s' --date=local"
# Usage
gitag
Enter fullscreen mode Exit fullscreen mode

Alt Text

gitbr - Provide minimal graphical display

#Provide minimal graphical display
alias gitbr='git log --oneline --decorate --graph --all'
# Usage
gitbr
Enter fullscreen mode Exit fullscreen mode

Alt Text

Used gitbr a lot in the passed but now use tig which does the same and more

Alt Text

Credit for these alias goes to https://github.com/usplitu

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more