Log Formatter
Git log format generator online. Customize git log output with format placeholders. Generate pretty log commands—copy instantly.
⚡ Quick Presets
Format Builder (click to SET, double-click to APPEND)
Hash
Author
Date
Message
Refs
Formatting
Current Format String
Options
⌨️ Git Command
git log -n 10 --pretty=format:"%h - %s (%ar)"👁️ Example Output
a1b2c3d - feat: add OAuth2 login (2 hours ago) b2c3d4e - fix: auth token expiry (1 day ago) c3d4e5f - docs: update README (3 days ago)
Features
- Visual builder for `git log` formats
- Presets (One-line, Detailed, Graph)
- Color and placeholder customization
- Preview output instantly
- Copy ready-to-run command
Common Use Cases
- Creating pretty git aliases
- Generating change reports
- Analyzing history visually in the terminal
Git Log Formatting
The `git log` command supports powerful formatting options using the `--pretty=format:"..."` flag. You can control exactly what information is shown (hash, author, date, subject) and how it is colored.
Examples
Valid - One Line
git log --oneline Valid - Custom
git log --pretty=format:"%h - %an, %ar : %s"Frequently Asked Questions
What is %h?
The abbreviated commit hash.
What is %an?
The author name.
What is --graph?
It draws a text-based graphical representation of the commit history on the left side.
💡 Tips
- Save your favorite format as an alias like `git lg` using the Alias Generator tool.