DEV Community

Cover image for Here is why you should not be too quick at judging people by their GitHub activity stats
Bobby Iliev
Bobby Iliev

Posted on • Edited on • Originally published at devdojo.com

Here is why you should not be too quick at judging people by their GitHub activity stats

Introduction

I am a supporter of the opensource movement and I truly admire people like Eddie Jaoude, Matt Cowley and all other open-source maintainers who work hard every day so that we could have awesome software! ๐Ÿ™

I strongly encourage everyone to be active in the open-source world and make meaningful contributions. If you are new to the open-source world, make sure to follow Hacktoberfest!

With this post, I aim to raise awareness and show you why you should not be too quick at judging people by their GitHub activity stats as they can be easily manipulated.

Here I am going to share a short bash script, which took me 5 minutes to write, that will turn your contributions graph from this:

GitHub Activity Before

Into this:

GitHub Activity After

In 20-30 seconds.

Use this for demo purposes only!

Prerequisites

Before you get started, it is best to create a new empty private repository that you could experiment with and turn on private contributions which will show as anonymized in your private activity on your profile:

Show private contributions on GitHub

Another thing that you would need is a bash terminal. Usually, when I test scripts that I've found on the internet, I like to run them on a virtual machine rather than directly on my laptop. For that, I use DigitalOcean as I can get a fully functional server in 40-50 seconds and then delete it once I'm done testing.

If you wish, you can use my affiliate code to get free $100 DigitalOcean credit to spin up your servers and test the script on there.

Running the script

You can find the script here:

GitHub Activity Demo Script

To execute the script, first, clone your demo repository with the git clone command, then use the cd command to go to the repository folder and then just run the following command inside a demo repository:

wget https://raw.githubusercontent.com/bobbyiliev/github-activity-bash-script/main/activity.sh
Enter fullscreen mode Exit fullscreen mode

The above will download the activity.sh script and then in order to run the script execute the following command:

bash activity.sh
Enter fullscreen mode Exit fullscreen mode

This will generate between 2 and 7 dummy commits for each day for the past 365 days and alter the commit date accordingly.

To check the commit log run:

git log
Enter fullscreen mode Exit fullscreen mode

Finally, as we've made some commits in the 'past', force-push your changes to your GitHub demo repository:

git push origin -f your_branch_name
Enter fullscreen mode Exit fullscreen mode

Then go to your GitHub profile and check your activity stats.

Note: sometimes it takes GitHub a few minutes to render the new stats, so you might have to wait a few minutes.

I would encourage you to delete that demo repository and get rid of those fake commit stats.

Conclusion

This script aims to prove why you should be too quick at judging people by their GitHub activity stats as they can be easily manipulated.

For more information on the topic, make sure to check out this interesting discussion here:

Contribution graph can be harmful to contributors

In case that you are interested in learning more about Bash Scripting, make sure to check out this open-source eBook:

Introduction to Bash Scripting

I am also working on my first video series on how to get started with Bash Scripting, you can check it out here:

Hope that you find this useful!

Top comments (16)

Collapse
 
miguelmj profile image
MiguelMJ

This is very interesting ๐Ÿค”
In my opinion, the activity graph is only a indicator of the interest of a person in GitHub, not about the quality of his/her contributions. When I want to see if someone makes interesting contributions I usually navigate through the repos. I think that's what a recruiter would do too.
However, this is a fantastic demonstration!

Collapse
 
rileytomasek profile image
Riley Tomasek • Edited

A good recruiter would, but there are many recruiters who have only a super basic understanding of GitHub, or how software in general works.

The repos that you have pinned are probably the most important part of your profile from a hiring perspective.

Collapse
 
miguelmj profile image
MiguelMJ

That makes sense, I hadn't thought of it!

Collapse
 
bobbyiliev profile image
Bobby Iliev

Very good point!

Collapse
 
eltaiguer profile image
Jose Gazzano

And also it doesn't really tell you much, I've been working as a part-time developer between 2012-2016 and full time since then, if you check my graph you would see a rather sparse graph.

Does that mean I'm not coding enough? Or that I just do fewer commits for each feature?

One developer that has tons of small commits on a PR against one that squashes them, how would they match against?

Collapse
 
bobbyiliev profile image
Bobby Iliev

Thank you ๐Ÿ™
Absolutely! This should be the way to go and I hope that more and more people are actually doing it. Though it could be tricky as your contributions could be private and still show in your activity graph.

Collapse
 
igordsm profile image
Igor Montagner

Why would you judge someone from their Github activity stats? I mean, people seriously do that?

Collapse
 
bobbyiliev profile image
Bobby Iliev

Mainly recruiters, and as @rileytomasek mentioned in the comments, a good recruiter would not do that, but there are many recruiters who have only a super basic understanding of GitHub, or how software in general works.

Collapse
 
jimmont profile image
Jim Montgomery

The Dev.to article immediately following this in the posts list is "How to get 600+ Github stars in 2 days" dev.to/revolist/hot-to-get-400-git...

Collapse
 
bobbyiliev profile image
Bobby Iliev

That's interesting, I think it's because the two articles were posted on the same date and they have git in the title + github tag.

Collapse
 
jimmont profile image
Jim Montgomery • Edited

I found it hilariously funny that one article's premise is broadly be thoughtful and well considered while the other is more in the other direction of generate lots of attention. Through my career I tend to hate being the center of attention so under play my position, which doesn't work well in this industry, the past decade-ish. Sort of funny to see the various dynamics in this area of work.

Collapse
 
anubhavitis profile image
Anubhav Singhal

This is incredible!
I didn't know it was possible!

Collapse
 
bobbyiliev profile image
Bobby Iliev

Yes, it is crazy what a simple Bash script could do ๐Ÿ™Œ

Collapse
 
alexgeorgiev17 profile image
Alex Georgiev

Wow, that's super crazy. I agree with you that people should take their time when looking at someone's github account and their contributions graph.

Cheers

Collapse
 
bobbyiliev profile image
Bobby Iliev

Yes, I absolutely agree. It is not fair on the hard-working maintainers and other people who actually do meaningful contributions.

Collapse
 
emperoryp7 profile image
Yash Pandey (YP) • Edited

That's cheating!! Cries in corner. ๐Ÿ˜ข
It was fun to make it all green by contributing to open source and making many commits for our projects.