DEV Community

Cover image for Rewriting git commit History is fun
Ankit Beniwal
Ankit Beniwal

Posted on

4 3

Rewriting git commit History is fun

Howdy folks? I hope you all are staying safe.

So, I was looking at the git commit documentation and found a very interesting parameter for specifying the date while performing a commit.

Basic Syntax is:

git commit --date=<date>
Enter fullscreen mode Exit fullscreen mode

I also saw two related environment variables - GIT_AUTHOR_DATE & GIT_COMMITTER_DATE.

Then, the moment came when this idea struck my mind of rewriting commit history. But as usual, after digging deep I came to know that the idea has already been executed. (Why it happens all the time?? Is there anything left for me to do? :D)

My previous year's github contribution history which was pretty white looked like:

pagalprogrammer's github contribution history for the year 2018 - before


Fig.1 - My GitHub Contribution History of 2018 (Original)

And with the help of a automation script, I rewrote it to:

pagalprogrammer's github contribution history for the year 2018 - after


Fig.2 - My GitHub Contribution History of 2018 (Rewritten)

After this, I explored more and found gitfiti. Take a look at it if you wanna know more about it. It helped me rewrite my contribution history in a graffiti style.

The final result:

pagalprogrammer's github contribution history for the year 2016 - after


Fig.3 - My GitHub Contribution History of 2016

Take a peek at my GitHub History.

I also wrote about this in my first rant on devRant. Go ++ it out: https://devrant.com/rants/2979790/rewrote-my-git-commit-history-now-it-looks-real-d

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay