Contribution GraphsBeginner8 min read

Understanding GitHub Contribution Graphs

Learn how GitHub contribution graphs work, what counts as a contribution, and how to make the most of your activity visualization.

Last updated:

What is the GitHub Contribution Graph?

The GitHub contribution graph—often called the "green squares" or "contribution calendar"—is a visual heatmap displaying your activity on GitHub over the past year. Each small square represents a single day, and the color intensity indicates how much you contributed on that day. Gray means no contributions; deeper shades of green indicate more activity.

This simple visualization has become one of the most recognized elements of a developer's GitHub profile. It appears prominently on your profile page, visible to anyone who visits. For better or worse, it has become an informal signal of developer activity in the tech industry.

The Graph's Structure

The contribution graph displays 365 days (or 366 in leap years) arranged in columns representing weeks. Each column contains seven squares for the days of the week, with Sunday at the top and Saturday at the bottom. The rightmost column represents the current week, with the graph extending back one full year.

Hovering over any square reveals the exact date and contribution count for that day. Below the graph, GitHub displays your total contributions for the year, your current streak (consecutive days with contributions), and your longest streak.

Why Contribution Graphs Matter

The contribution graph carries outsized importance in the developer world:

First impressions: When someone visits your GitHub profile, the contribution graph provides an immediate visual impression. A dense, active graph suggests an engaged developer. A sparse graph might raise questions about activity levels. Recruiter signals: Many recruiters and hiring managers glance at contribution graphs as a quick proxy for coding activity. While this practice has critics (not everyone's work happens on public GitHub), it remains common in hiring processes. Personal motivation: The graph's streak counter motivates many developers to maintain consistent coding habits. Seeing unbroken chains of green squares can reinforce daily practice. Credibility indicators: Unlike claims on a resume, contribution data comes directly from GitHub. It provides verifiable evidence of activity that can't be easily fabricated. Conversation starters: In interviews, graphs often prompt questions about specific projects or periods of high activity, providing natural topics for discussion.

What Counts as a Contribution?

Understanding exactly what counts toward your contribution graph helps you ensure your work is properly credited. GitHub tracks several types of activity.

Commits

Commits are the most common contribution type. However, not all commits count toward your graph:

Commits that count:
  • Commits pushed directly to the default branch (usually main or master)
  • Commits pushed to the gh-pages branch
  • Commits from merged pull requests
  • Commits that become part of the repository's history through rebasing or squashing
Requirements for commit counting:
  • The email address on the commit must be associated with your GitHub account
  • For public repositories, commits always count
  • For private repositories, you must enable "Private contributions" in your settings
Commits that don't count:
  • Commits to forks that haven't been merged via pull request
  • Commits with email addresses not linked to your account
  • Commits to branches other than the default branch (unless merged)
  • Commits overwritten by force pushes

Pull Requests

Opening a pull request counts as a contribution regardless of whether it gets merged. This acknowledges the work of proposing changes, even if they're ultimately rejected or superseded.

The pull request counts on the day it was opened, not when it was merged. If you open a PR on Monday and it merges on Friday, the contribution appears on Monday.

Issues

Creating an issue counts as a contribution. This includes bug reports, feature requests, and discussion topics. GitHub recognizes that identifying problems and proposing improvements is valuable work, even without code changes.

Like pull requests, issues count on the day they're opened.

Code Reviews

Reviewing pull requests counts as contributions. This includes:

  • Approving a pull request
  • Requesting changes
  • Leaving review comments
Code review is essential to software quality. GitHub's contribution system acknowledges reviewers' work, not just authors'.

Repository Creation

Creating a new repository counts as a contribution on the day it was created.

What Doesn't Count

Several activities don't contribute to your graph despite their value:

Commits to forks: If you fork a repository and commit to your fork, those commits don't count—unless you open a pull request and it gets merged into the original repository. Stars, watches, and follows: Social interactions on GitHub don't count as contributions. Starring a project or following a developer won't add green squares. Comments (outside of reviews): Regular comments on issues or pull requests don't count. Only formal code review comments count. Wiki edits: Editing a repository's wiki pages doesn't count toward contributions. Gists: Creating or updating Gists doesn't appear on your contribution graph. Private activity (by default): Activity in private repositories is invisible unless you enable "Private contributions" in your settings.

Understanding the Color Scale

GitHub uses five levels of color intensity to represent contribution activity:

Level 0 (Gray): No contributions on that day. The square appears in a neutral gray color. Level 1 (Light green): Low activity. This might represent a single commit or pull request. Level 2 (Medium light green): Moderate activity. Several contributions on this day. Level 3 (Medium dark green): High activity. A productive day with multiple contributions. Level 4 (Dark green): Very high activity. An exceptionally productive day.

How Color Thresholds Work

The color scale is relative to your own activity, not compared to other developers. GitHub calculates the thresholds based on your contribution distribution over the past year. If your maximum contribution day had 20 commits, the scale adjusts accordingly. If your maximum was 5 commits, the thresholds shift to reflect that.

This means a "dark green" day for one developer might represent 30 contributions, while for another developer it might represent 8. The colors show patterns in your own activity, not absolute productivity measures.

Quartile Calculation

GitHub uses quartiles to determine color thresholds. After excluding days with zero contributions, your contribution counts are divided into four quartiles:

  • Days in the first quartile (lowest 25%) appear as level 1
  • Days in the second quartile (25-50%) appear as level 2
  • Days in the third quartile (50-75%) appear as level 3
  • Days in the fourth quartile (top 25%) appear as level 4
This statistical approach ensures the color distribution looks meaningful regardless of your absolute activity level.

Common Contribution Graph Problems

Commits Not Appearing

If your commits aren't showing up on your graph, check these common issues:

Email mismatch: Your commit email must match an email address verified in your GitHub account settings. Check your Git configuration with git config user.email and ensure that email is added to your GitHub account. Wrong branch: Commits to non-default branches don't count until they're merged. If you're working on a feature branch, your commits appear after merging to main. Private repository settings: For private repositories, contributions don't appear by default. Enable "Private contributions" in your profile settings to include them. Force push overwrite: If you force-pushed and rewrote history, commits may have been lost. The contribution graph reflects the current state of the repository.

Time Zone Confusion

GitHub records contributions in UTC (Coordinated Universal Time). A commit made at 11 PM in your local time might appear on the next day if you're in a time zone behind UTC.

This can cause confusion when you're trying to maintain a streak. A commit at 11 PM Pacific Time (UTC-8) registers as 7 AM the next day in GitHub's system.

Fork Contribution Visibility

Commits to forked repositories don't appear on your graph unless they're merged into the original repository via a pull request. This design prevents contribution inflation from duplicated code.

If you maintain an active fork with your own modifications, those contributions remain invisible even though the work is legitimate.

Optimizing Your Contribution Graph

Making Activity Visible

If you do work that should count but doesn't appear, consider these adjustments:

Link all your email addresses: Add all email addresses you use for commits to your GitHub account. This catches commits made with different configurations. Enable private contributions: If you work in private repositories, toggle on "Private contributions" in your profile settings. This shows that you're active without revealing repository details. Merge feature branches: Instead of working indefinitely on feature branches, merge to main when features are complete. This makes your work visible on the graph.

Embedding in Your README

Your contribution graph appears on your profile page, but it's below the fold on most screens. For maximum visibility, embed your graph in your profile README:

Markdown
![My Contributions](https://gitblend.com/api/contributions/github?username=sergebulaev&theme=github)

GitBlend provides customizable contribution graphs that can match your profile aesthetic:

Theme options: Choose from over 20 themes including github, gitlab, dracula, nord, tokyo, synthwave, and more. Multi-platform support: Combine GitHub and GitLab contributions in a single unified graph. Custom styling: Adjust colors to match your profile design.

Theme Customization

Markdown
![Contributions](https://gitblend.com/api/contributions/github?username=sergebulaev&theme=dracula)

Popular themes include:

  • github: Classic GitHub green gradient
  • gitlab: GitLab purple tones
  • dracula: Popular dark theme
  • nord: Arctic blue palette
  • tokyo: Tokyo Night colors
  • synthwave: Retro 80s aesthetic

The Psychology of Streaks

GitHub prominently displays your "current streak" (consecutive days with contributions) and "longest streak." These metrics can be motivating but also problematic.

The Positive Side

Streak tracking can reinforce positive habits:

  • Consistency motivation: Wanting to maintain a streak encourages daily practice
  • Visible progress: Watching your streak grow provides satisfaction
  • Habit formation: Daily coding can become automatic over time

The Problematic Side

Streak obsession can become unhealthy:

Burnout risk: Forcing yourself to code every single day, including weekends, holidays, and sick days, leads to exhaustion. Sustainable coding careers require rest. Quality degradation: When you commit just to maintain a streak, quality suffers. Meaningless commits clutter repositories and teach bad habits. Metric manipulation: Some developers commit trivial changes—fixing typos, adding blank lines—just for the green square. This games the system while providing no real value. Misaligned priorities: The streak becomes the goal rather than a side effect of productive work. This inverts the purpose of the metric.

A Healthy Perspective

Remember what the contribution graph actually measures: recorded activity on GitHub. It doesn't capture:

  • Code quality
  • Impact of your work
  • Learning and growth
  • Work on non-GitHub platforms
  • Architecture and design thinking
  • Mentoring and code review quality
  • Documentation improvements
A sparse contribution graph might indicate a developer who works on complex problems requiring deep thought. A dense graph might represent someone making many small, low-impact changes. Neither tells the complete story. Quality over quantity: One meaningful commit beats ten trivial ones. Focus on valuable work, and let the graph reflect that naturally. Rest is productive: Taking breaks prevents burnout and often leads to better solutions. A gap in your graph might represent a vacation that restored your creativity. Real projects over streak maintenance: If you're committing just to see green, redirect that energy toward learning something new or building something meaningful.

Your value as a developer isn't measured in consecutive green squares. The contribution graph is one signal among many, and often not the most important one.

GitLab and Other Platforms

The GitHub contribution graph only tracks GitHub activity. If you work across multiple platforms, your GitHub graph tells an incomplete story.

The Multi-Platform Problem

Many developers split their work:

  • Professional work on GitLab or Bitbucket
  • Personal projects on GitHub
  • Client work on various platforms
Your GitHub graph only shows a fraction of your actual activity.

GitBlend's Solution

GitBlend solves this by combining contributions from multiple platforms:

Markdown
![All Contributions](https://gitblend.com/api/contributions/combined?github=yourusername&gitlab=yourgitlabuser&token=yourtoken&theme=github)

This creates a unified visualization of your coding activity across platforms, giving visitors a complete picture of your work.

Next Steps

Now that you understand how contribution graphs work, put that knowledge into practice:

Ready to enhance your profile?

Create beautiful contribution graphs for your GitHub profile in seconds with GitBlend.

Get Started Free