Pretty Git Log Formatting

gitbeginnercross-platform

Create a beautiful, one-line git log view with colors, graphs, and commit information using git aliases

#git#log#alias#formatting#productivity

Pretty Git Log Formatting

Overview

Create a beautiful, one-line git log view with colors, graphs, and commit information using git aliases

Prerequisites

  • Git

Instructions

  • Paste this text in your terminal
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Your new git log is now git lg.

Troubleshooting

If you encounter any issues:

  1. Verify all prerequisites are installed
  2. Check command syntax carefully
  3. Ensure you have necessary permissions

Related Utilities

  • Git Configuration