Yet Another Github Streak Hack
I wrote about a Github streak hack some time ago which involved changing system date to make commits in the past. How lame.
While the previous hack would could be used to fill gaps in your streak, the one I found today will allow you to massively increase the number of commits you’ve pushed.
This trick involves knowing some non-beginner stuff about Git, like what a reachable commit is, what a git rebase is and what it does to your repository.
It’d also help to learn what @~3, HEAD mean.
Github calculates your contribution activity by the number of unique commits that you push. In a repository with history that’s not modified, things are alright; but once you start tampering with your history, doing a rebase for example, things get pretty interesting.
So let’s say you have a repository with 10 commits. Your contribution activity will show something like “Pushed 10 commits to …”
Now if you modify an older commit - for eg. using an interactive rebase to change the commit message of @~7 - all the commits from @~7 to HEAD will get new identities (SHA-hashes) as a commit below them was modified.
Once you force push these commits to Github, they’ll be counted again in your contributions chart. So your activity will change to something like “Pushed 17 commits to …” whereas if you look at the commit list of your repo it’ll still show 10 commits, since the others are not reachable from HEAD.
If you want to know what it looks like