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

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

Written by Bobby Iliev on Jan 25th, 2021 Views Report Post

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

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

bash activity.sh

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

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

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!

Comments (0)