DEV Community

Cover image for How to improve your GitHub vanity metrics FAST

How to improve your GitHub vanity metrics FAST

At the end of last year, I was contacted by a dev who said something like

Wow, you have an impressive GitHub profile.

I won't lie, it's always good for the ego when someone found your work useful.

But here he had something else in mind, what he meant is that my GitHub contribution graph looked very green

You even work on week-ends !

God forbid no, I have a life!

What actually happened is that I write a lot and wants all my rumblings to be safe at any point of time.

In practice I write in Obsidian, the best thing since slice bread for me. And it was obsidian-git, running every 10 minutes or so, who was keeping my GitHub vanity metrics very green.

Can I become a time traveler and do that one year ago ?

Yes, git has you covered

git add .
git commit --date "10 days ago" -m "Committed by a time traveler"
Enter fullscreen mode Exit fullscreen mode

Can I do that fast as promised in the title ?

Yes, clone my repository

GitHub logo jmfayard / timetraveler

Create fake commits for every day last year

Time Traveler

From this

image

to this

image

FAST

Commits for the last 360 days

  • Added fake commit Fake commited 360 days ago
  • Added fake commit Fake commited 359 days ago
  • Added fake commit Fake commited 358 days ago
  • Added fake commit Fake commited 357 days ago
  • Added fake commit Fake commited 356 days ago
  • Added fake commit Fake commited 355 days ago
  • Added fake commit Fake commited 354 days ago
  • Added fake commit Fake commited 353 days ago
  • Added fake commit Fake commited 352 days ago
  • Added fake commit Fake commited 351 days ago
  • Added fake commit Fake commited 350 days ago
  • Added fake commit Fake commited 349 days ago
  • Added fake commit Fake commited 348 days ago
  • Added fake commit Fake commited 347 days ago
  • Added fake commit Fake commited 346 days ago
  • Added fake commit Fake commited 345 days ago
  • …




Run the script run.sh

Create a new empty repository timetraveler on GitHub and push your new local repository there.

And in no time, you will have perfect GitHub vanity metrics just like me

Image description

Top comments (9)

Collapse
 
darkwiiplayer profile image
π’ŽWii πŸ³οΈβ€βš§οΈ

Regarding the time travel thing: I have this fun little script named git-timeshift that looks like this:

#!/bin/sh
DATE="$1"; shift 1
export GIT_AUTHOR_DATE=$(date +%s -d "$DATE")
export GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
git "$@"
Enter fullscreen mode Exit fullscreen mode

So I can just type stuff like git timeshift "in 1 hour" commit and the commit (or whatever other command I run) will happen one hour in the future 🀭

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

A whole new world of possibilities to confuse your colleagues, ah ah

Collapse
 
darkwiiplayer profile image
π’ŽWii πŸ³οΈβ€βš§οΈ

Pretty sure that's still far from the worst thing you can do with git if you really want to confuse people. Like, I've more than once re-ordered commit trees before merging branches to turn my erratic changes into a more coherent representation of what changes were made, and that inevitably leads to commits sometimes being completely out of chronological order :D

Collapse
 
ahmad-ali14 profile image
Ahmad Ali

Not cool; while the lessons the author wrote are pretty valuable, I advice against this fpr juniors.

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

The article is tagged with #jokes

Collapse
 
karma0 profile image
Bobby

May be worth mentioning/reminding people that this only looks good from an initial glance - if someone digs in, clicking through, it can make it obvious that there is only one repo that is there to serve up a commit history. Nonetheless, I have gotten many a compliment in interviews about it!

You can also scaffold out several projects in the language and framework of choice and create a fake history for each of them so that it looks like you're working on some cool things, but none of this will work if someone wants to dig in quickly to see what some of your commits may have actually looked like at some random point in time

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

I feared that adding "this is a joke" would kill the joke.
I ended up putting "Vanity Metrics" in the title instead :)

Collapse
 
fullstackscout profile image
Gary • Edited

Thanks for the "advice".

I'll keep on doing it long form with legit, commented, repo pushes.

To each their own I guess.

Edit: k, yeah I see the "joke" tag now.

Carry on.

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

No worry, I have a weird sense of humor.

I have done worse though
dev.to/jmfayard/why-real-developer...