In this blog post, I will answer the question of how to enrich GitHub statistics to improve your job prospects by enriching your GitHub contribution graph.
Problem
In interviews, people judge developers by their GitHub.Recently, I saw a tweet with a picture showing GitHub contributions with one commit of activity and the caption:
“Please don’t apply for a Senior dev position if your GitHub looks like this…”
There are many tools to fake GitHub history: 1 , 2 , 3 . But they create unreal commits, which is cheating. We need to find another way to enrich GitHub activity.
Resolution
You may remember that your company uses GitLab for day-to-day commits. Let’s export these commits to GitHub.
I use the tool
import-gitlab-commits
.
It’s written in Go, very handy to run, and exports commits in an anonymized way to comply with NDA.
I will import my Clarity commits from their internal GitLab VCS
clarity.gitlab.com
.
My GitHub statistics for 2020 before running import-gitlab-commits look like:
Step 1: Install import-gitlab-commits
First, let’s install Go and run the command:
go install github.com/alexandear/import-gitlab-commits@latest
Step 2: Execute import-gitlab-commits
Next, set the required environment variables:
export GITLAB_BASE_URL=https://clarity.gitlab.com
export GITLAB_TOKEN=your_secure_token
export COMMITTER_NAME="Oleksandr Redko"
export COMMITTER_EMAIL=oleksandr.red+github@gmail.com
where:
GITLAB_BASE_URLis a GitLab instance URL .GITLAB_TOKENis a personal access token . It will be used to fetch your commits fromGITLAB_BASE_URL.COMMITTER_NAME,COMMITTER_EMAILare my GitHub name and email.
And run the command:
import-gitlab-commits
The tool will perform the following operations:
- Connect to
GITLAB_BASE_URLusingGITLAB_TOKENand get myoredkouser info. - Fetch all GitLab projects that
oredkocontributed to. - For all projects, retrieve the commits where the author is
oredko. - Create a new repo
repo.clarity.gitlab.com.oredkoon disk. Add new commits for all fetched info with the messageProject: <PROJECT_ID> commit: <COMMIT_HASH>and committerOleksandr Redko <oleksandr.red+github@gmail.com>:
Step 3: Create a GitHub repository and push to it
Finally, follow
the guide
and create a new GitHub repository called clarity-contributions.
Open the repo created by import-gitlab-commits and push to GitHub:
cd repo.clarity.gitlab.com.oredko
git remote add origin git@github.com:alexandear/clarity-contributions.git
git push
That’s it. My empty GitHub contribution graph from 2020 became full of commits:
Summary
In this article, I suggest a way to enrich GitHub activity by exporting real GitLab statistics.
The
import-gitlab-commits
tool is a good solution for this purpose.



