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

By Bobby Iliev, 2021-01-25. https://bobbyiliev.com/post/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](https://twitter.com/eddiejaoude), [Matt Cowley](https://twitter.com/MattIPv4) 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](https://twitter.com/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](https://imgur.com/SFQ3RJz.png)

Into this:

![GitHub Activity After](https://imgur.com/xJ6MjFH.png)

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](https://imgur.com/h5LYWtb.png)

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](https://m.do.co/c/2a9bba940f39) to spin up your servers and test the script on there.

# Running the script

You can find the script here:

[GitHub Activity Demo Script](https://github.com/bobbyiliev/github-activity-bash-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](https://github.com/isaacs/github/issues/627)

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](https://github.com/bobbyiliev/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:

<iframe width="100%" height="399" src="https://www.youtube.com/embed/ur9lAPcbMhs" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Hope that you find this useful!
