DevOps Generators

Log Formatter

All tools

Trim full commit hashes to seven characters and line up a pasted log.

How it works

Four simple steps

1

Export the log

Run git log with one commit per line and copy the output.

2

Paste it in

Lines starting with a hash are detected automatically.

3

Shorten the hashes

Each hash is cut to seven characters and evenly spaced.

4

Copy the result

Paste the tidy list into a ticket, changelog or chat.

Log Formatter

About Log Formatter

You want to drop a list of recent commits into a release ticket, but the output you have uses full 40-character hashes that wrap badly. This formatter shortens them so the commit messages are what people actually read.

Each line that begins with a hexadecimal hash of 7 to 40 characters followed by whitespace is rewritten as the first seven characters of the hash, two spaces and the rest of the line. Lines that do not start with a hash, such as Author: and Date: lines from the default log format, pass through unchanged. Output updates as you paste.

It works best with input that is already one commit per line, like the output of git log --format="%H %s" or --pretty=oneline. If you can run Git yourself, git log --oneline already abbreviates hashes, and in large repositories it may print more than seven characters to keep them unique. This tool always cuts to seven, so keep full hashes anywhere a script has to resolve them.

The text is reformatted in your browser. To compare two logs or changelog drafts, use the side-by-side diff checker. If you are cleaning history before publishing it, the rebase command reference helps, and the Git alias set includes a compact log graph command.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Only lines that start with a hash are reformatted. The default multi-line git log output keeps its other lines as they are. Use a one-line format to get one tidy entry per commit.

Not in large repositories. Git itself prints longer abbreviations when needed to avoid collisions. Keep full hashes for scripts and automation, and short ones for human-readable notes.

No. The default log header starts with commit followed by the hash, so the line does not begin with a hash and is left alone. Use --pretty=oneline or a custom --format string instead.

View more FAQs

Related tools

View all

Kubernetes Manifest Studio

Generate Deployment, Service, and Ingress YAML with a drift checklist.

Open

K8s Inspector

Summarize Kubernetes YAML kinds, names, and labels.

Open

K8s Resource Diff

Diff two Kubernetes manifests locally.

Open

K8s Manifest Splitter

Split multi-document YAML into one file per resource.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools