DEV Community

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

Posted on

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

Top comments (0)