cd /news/developer-tools/git-blame-color-scale-from-20-month-… · home topics developer-tools article
[ARTICLE · art-9002] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Git blame color scale from 20 month ago to now (https://stackoverflow.com/a/66250482/6320039)

The Stack Overflow answer provides a Git configuration snippet that creates a color scale for `git blame` output, mapping lines of code to their age from 23 months ago to the present. It uses the `highlightRecent` coloring mode with a series of terminal color codes (226-255) assigned to specific time intervals, such as 234 for 23 months ago and 226 for 1 week ago. The configuration also sets the blame date format to "human" for readability.

read1 min views23 publishedFeb 17, 2021

.gitconfig

  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

Show hidden characters

[color "blame"] highlightRecent = 234, 23 month ago, 235, 22 month ago, 236, 21 month ago, 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226

[blame] coloring = highlightRecent

date = human

example-from-rails.png scale.png

── more in #developer-tools 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/git-blame-color-scal…] indexed:0 read:1min 2021-02-17 ·