Skip to main content

Why Your Github Contributions Are Not Counted

Lem Dulfo
Senior Software Developer @ Clio

I've been working on my website, and I noticed that my Github heatmap was not updating. Okay, some devs can pretend that we don't care about the heatmap, but I can't.

GitHub heatmap showing only 103 contributions

I looked commit history, and noticed this weird thing. When I added the CNAME, which is done through GitHub web, it tags the correct author. My other commits, which I did on my laptop, was a different author (still me).

Commit history with wrong user

So I went and investigated what my local settings were:

git config --global user.name
git config --global user.email
git config user.name
git config user.email

It was something else, somehow I set my iCloud email, and my first name as the user.name.

Git history is basically just a bunch of files, I know it can be edited. Just be warned, it can sometimes make your repo irrecoverable, and even mangle your history. Try not to do this at your job without proper backups, especially since you'll have to force push.

git filter-branch -f --env-filter '
GIT_COMMITTER_NAME="@bytehala";
GIT_COMMITTER_EMAIL="your-correct-email@example.com";
GIT_AUTHOR_NAME="@bytehala";
GIT_AUTHOR_EMAIL="your-correct-email@example.com";
' --tag-name-filter cat -- --branches --tags

You'll see this WARNING: git-filter-branch has a glut of gotchas generating mangled history rewrites. I chose to ignore that. heh

After force pushing, here's my new heatmap, showing I made 141 commits so far this 2025:

New heatmap with correct counts

Android Studio Build Failing

Lem Dulfo
Senior Software Developer @ Clio

I'm currently primarily working in React Native, and a lot of the time, I use the command line to launch the app, for Android it's react-native run-android

Sometimes though, you need to launch the app through Android Studio. For example when you want an easy way to see Logcat logs.

I ran into this issue where the app was building properly through the command line, but failing in Android Studio.

Android studio build failing

This is odd, because behind the scenes, both the command line and Android Studio use the same tools.

One of the build errors mentioned react-native-vector-icons, and I found this issue on their Github: https://github.com/software-mansion/react-native-svg/issues/1723

It mentions react-native doctor and JDK 17. The thing is, running this in command line, where the build is already succeeding, will most likely show that you have the correct version of JDK.

Could it be that Android Studio was using a different JDK version? Let's check.

Android Studio Gradle JDK setting

It was using JDK 21 for some reason. I changed it to JDK 17 and the build succeeded.

Android Studio build successful

So there it is, here's some things I learned:

  • react-native doctor is available, I didn't know about it before
  • Android Studio runs a different environment from your command line
  • Error messages can sometimes mislead you, treat them as a clue instead of a fact