Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hajjouz/github-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 

Repository files navigation

GitHub Contributions Checker

A simple Python diagnostic tool to troubleshoot why your GitHub contributions are not showing up in your profile statistics, even though they appear in the contribution graph.

🎯 Problem This Solves

Have you ever experienced this frustrating situation?

  • βœ… Your commits appear in the contribution graph (green squares)
  • ❌ But they don't count in your total contribution stats
  • ❌ Last year's contributions are missing from your profile
  • ❌ Your contribution streak is broken despite regular commits

This tool helps you diagnose and fix these issues!

🌟 Features

βœ… Automated Checks - Runs 5+ critical checks automatically
βœ… Scoring System - Shows exactly what passed and what failed with percentage
βœ… Progress Bar - Visual progress indicator with 50-character bar
βœ… Visual Boxes - Professional boxed messages with borders (╔═══╗)
βœ… Numbered Lists - Clear numbered output for passed/failed checks
βœ… Clear Solutions - Provides actionable fixes for each issue
βœ… Email Verification - Checks if commits use the correct email
βœ… Branch Detection - Verifies you're on the default branch
βœ… Push Status - Confirms changes are synced with GitHub
βœ… Visual Checkboxes - Clear β˜‘/☐ indicators for completed/pending items
βœ… Summary Box - Professional summary with status, action, and progress
βœ… Step-by-Step Guide - Detailed manual verification steps

πŸ“‹ Requirements

  • Python 3.6 or higher
  • Git repository
  • Internet connection (for checking remote)

No additional dependencies required! Uses only Python standard library.

πŸš€ Installation

  1. Download the script
gitclone https://github.com/Hajjouz/github-stats
  1. Make it executable (optional)
chmod +x check.py

πŸ’‘ Usage

Basic Usage

Simply run the script in your Git repository:

python3 check.py

Expected Output

======================================================================
   GITHUB CONTRIBUTIONS DIAGNOSTIC
======================================================================

1. EMAIL CONFIGURATION
----------------------------------------------------------------------
   Git email: [email protected]
   βœ… Email configured
   ⚠️  Must be VERIFIED at: https://github.com/settings/emails

2. BRANCH CHECK
----------------------------------------------------------------------
   Current branch: main
   Default branch: main
   βœ… On default branch (contributions will count)

3. RECENT COMMITS
----------------------------------------------------------------------
   a1b2c3d [email protected]         2024-10-05
   d4e5f6g [email protected]         2024-10-03
   βœ… Commits use configured email ([email protected])
   ⚠️  Email MUST be verified in GitHub!

4. REMOTE REPOSITORY
----------------------------------------------------------------------
   Remote URL: https://github.com/username/repo.git
   βœ… GitHub repository
   GitHub Profile: https://github.com/username
   βœ… Local and remote in sync (pushed)

5. COMMIT STATISTICS
----------------------------------------------------------------------
   Commits since 2024: 156
   Commits today: 3
   βœ… Repository has 156 commits

======================================================================
   VERIFICATION STATUS
======================================================================

πŸ“Š SCORE: 6/6 checks passed (100%)
──────────────────────────────────────────────────────────────────────
   [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%

βœ… PASSED CHECKS:
──────────────────────────────────────────────────────────────────────
   1. βœ“ Email configured in git
   2. βœ“ On default branch
   3. βœ“ Commits use correct email
   4. βœ“ Commits exist
   5. βœ“ Repository is on GitHub
   6. βœ“ Changes pushed to GitHub

======================================================================
   βœ… ALL AUTOMATED CHECKS PASSED!
======================================================================

   ╔════════════════════════════════════════════════════════╗
   β•‘  πŸŽ‰ CONGRATULATIONS! All automated checks passed!      β•‘
   β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

⚠️  MANUAL VERIFICATION REQUIRED:
──────────────────────────────────────────────────────────────────────

   πŸ“§ STEP 1: Verify Email
      β€’ Your email: [email protected]
      β€’ Visit: https://github.com/settings/emails
      β€’ Ensure green checkmark βœ“ next to your email

   πŸ”’ STEP 2: Check Private Contributions (if private repo)
      β€’ Visit: https://github.com/settings/profile
      β€’ Find: 'Contributions & Activity'
      β€’ Enable: β˜‘οΈ 'Include private contributions'

   ⏰ STEP 3: Wait for GitHub to Update
      β€’ Contribution graph: 5-30 minutes
      β€’ Total statistics: 24-48 HOURS ⚠️
      β€’ Be patient! GitHub needs time to recalculate

======================================================================
   οΏ½ MANUAL CHECKLIST
======================================================================

   β˜‘  Email configured in Git
   β˜‘  On default branch
   β˜‘  Changes pushed to GitHub
   ☐  Email VERIFIED in GitHub (manual check required!)
   ☐  'Include private contributions' ON (if private repo)
   ☐  Waited 24-48 hours for stats to update

======================================================================

╔════════════════════════════════════════════════════════════════╗
β•‘                       πŸ’‘ QUICK SUMMARY                         β•‘
╠════════════════════════════════════════════════════════════════╣
β•‘  Status:    βœ… All automated checks PASSED                    β•‘
β•‘  Action:    ⚠️  Verify email manually in GitHub               β•‘
β•‘  Wait:      ⏰ 24-48 hours for stats to update                β•‘
β•‘  Progress:  🟒 Ready for manual verification                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ” What Gets Checked

1. Email Configuration βœ‰οΈ

  • Checks if Git email is configured
  • Compares email in commits with configured email
  • Critical: Email must match a verified email in GitHub

2. Branch Status 🌳

  • Verifies you're on the default branch (main/master)
  • Critical: Contributions only count on default branch
  • Provides fix command if on wrong branch

3. Recent Commits πŸ“

  • Lists last 5 commits with emails and dates
  • Checks if commit emails match configured email
  • Confirms commits exist in repository

4. Remote Repository πŸ”—

  • Verifies repository is on GitHub
  • Extracts username from remote URL
  • Checks if local commits are pushed to GitHub
  • Provides direct links to GitHub settings

5. Commit Statistics πŸ“Š

  • Counts commits since last year
  • Shows commits made today
  • Helps verify repository activity

πŸ› Common Issues & Solutions

Issue #1: Email Not Verified (90% of cases!)

Problem:

❌ FAILED (1 check):
   βœ— Email not verified in GitHub

Solution:

  1. Go to GitHub Email Settings
  2. Find your email in the list
  3. Click "Resend verification email" if no green checkmark
  4. Check your inbox and verify the email
  5. Wait 24-48 hours for GitHub stats to update

Issue #2: Not on Default Branch

Problem:

❌ FAILED (1 check):
   βœ— Not on default branch

Solution:

# Switch to default branch
git checkout main

# Merge your changes
git merge your-branch-name

# Push to GitHub
git push origin main

Issue #3: Changes Not Pushed

Problem:

⚠️  Local ahead of remote - need to push!

Solution:

# Push your commits
git push

# Or if you need to set upstream
git push -u origin main

Issue #4: Wrong Email in Commits

Problem:

⚠️  Some commits use different email!

Solution:

# Set correct email for future commits
git config --global user.email "[email protected]"

# For existing commits, they won't retroactively count
# Make new commits with correct email

Issue #5: Private Repository

Problem: Contributions show in graph but not in public stats.

Solution:

  1. Go to GitHub Profile Settings
  2. Scroll to "Contributions & Activity"
  3. Check β˜‘οΈ "Include private contributions"
  4. This makes private repo contributions visible on your profile

⏰ Understanding GitHub Stats Update Time

It's important to understand GitHub's update schedule:

What Updates How Fast Notes
Contribution Graph 5-30 minutes Green squares update quickly
Total Stats 24-48 hours The number next to your name
Longest Streak 24-48 hours Contribution streak counter
Current Streak Real-time Updates within minutes

⚠️ Most Important: Even if all checks pass, you may need to wait 24-48 hours for your total contribution count to update!

πŸ“Š Scoring System

The tool provides a comprehensive scoring system with visual indicators:

πŸ“Š SCORE: 6/6 checks passed (100%)
──────────────────────────────────────────────────────────────────────
   [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%

Visual Elements:

  • Progress Bar - 50-character bar showing pass percentage (β–ˆ = passed, β–‘ = failed)
  • Percentage Score - Exact percentage of passed checks
  • Numbered Lists - Clear enumeration of passed and failed checks
  • Visual Boxes - Professional bordered messages (╔═══╗ characters)
  • Checkboxes - β˜‘ for completed items, ☐ for pending items
  • Color Indicators - 🟒 (ready), 🟑 (needs attention), πŸ”΄ (failed)

What Each Check Means:

  • βœ… Email configured in git - Git knows your email
  • βœ… On default branch - Commits will count
  • βœ… Commits use correct email - Email consistency
  • βœ… Commits exist - Repository has activity
  • βœ… Repository is on GitHub - Not GitLab/Bitbucket
  • βœ… Changes pushed to GitHub - Visible to GitHub

οΏ½ Output Formatting

The tool uses professional formatting for easy reading:

Progress Bar

[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%
[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘] 60%
[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘] 25%

Visual Boxes

╔════════════════════════════════════════════════════════╗
β•‘  πŸŽ‰ CONGRATULATIONS! All automated checks passed!      β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Numbered Lists

βœ… PASSED CHECKS:
   1. βœ“ Email configured in git
   2. βœ“ On default branch
   3. βœ“ Changes pushed to GitHub

Checkboxes

β˜‘  Email configured in Git
β˜‘  On default branch
☐  Email VERIFIED in GitHub (manual check required!)
☐  Waited 24-48 hours for stats to update

Summary Box

╔════════════════════════════════════════════════════════════════╗
β•‘                       πŸ’‘ QUICK SUMMARY                         β•‘
╠════════════════════════════════════════════════════════════════╣
β•‘  Status:    βœ… All automated checks PASSED                    β•‘
β•‘  Action:    ⚠️  Verify email manually in GitHub               β•‘
β•‘  Wait:      ⏰ 24-48 hours for stats to update                β•‘
β•‘  Progress:  🟒 Ready for manual verification                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

�🎯 Manual Verification Checklist

After running the tool, manually verify these items:

☐ Email Verification

  1. Visit: https://github.com/settings/emails
  2. Locate your email in the list
  3. Confirm it has a green checkmark βœ“
  4. If not, click "Resend verification email"

☐ Private Contributions (if using private repos)

  1. Visit: https://github.com/settings/profile
  2. Scroll to "Contributions & Activity"
  3. Enable: β˜‘οΈ "Include private contributions"

☐ Wait Period

  1. Graph updates: 5-30 minutes
  2. Total stats: 24-48 hours
  3. Be patient! GitHub needs time to recalculate

☐ Profile Check

  1. Visit your profile: https://github.com/YOUR_USERNAME
  2. Click "Contribution activity" dropdown
  3. Select different time periods
  4. Verify contributions appear

πŸ”„ Workflow Example

Scenario: Fixing Missing Contributions

# 1. Run diagnostic
python3 check.py

# Output shows you're not on main branch
# Score: 5/6 checks passed

# 2. Fix the issue
git checkout main
git push origin main

# 3. Run diagnostic again
python3 check.py

# Output shows all checks passed
# Score: 6/6 checks passed

# 4. Verify email in GitHub (manually)
# Visit: https://github.com/settings/emails

# 5. Wait 24-48 hours

# 6. Check your profile
# Visit: https://github.com/YOUR_USERNAME

🚨 Important Notes

⚠️ Backdated Commits

If you're using backdated commits (common in automation scripts):

  • βœ… Will show in contribution graph
  • βœ… Will count in total stats (if all requirements met)
  • ⚠️ But requires all checks to pass
  • ⏰ Needs time to update (24-48 hours)

⚠️ Fork Contributions

Contributions to forks only count if:

  • Pull request is merged to the original repository
  • Or you push directly to the fork's default branch

⚠️ Organization Repositories

Contributions to organization repos:

  • Always count regardless of privacy settings
  • Show up immediately in graph
  • May take time to update total stats

🐞 Troubleshooting

Script Shows All Passed But Stats Still Don't Update

Possible Reasons:

  1. Wait longer - Stats can take up to 48 hours
  2. Cache - Try clearing browser cache or private/incognito mode
  3. Email timing - If you just verified email, wait 24-48 hours
  4. Multiple emails - Check if you have multiple GitHub accounts

Script Can't Find Git Repository

Error: Not a git repository

Solution:

# Navigate to your git repository
cd /path/to/your/repository

# Then run the script
python3 check.py

Username Not Detected

Problem: Remote URL format not recognized.

Solution: The script handles these formats:

If yours is different, the script will still work but won't show username.

πŸ“š Additional Resources

GitHub Documentation

Related Tools

🀝 Contributing

Contributions are welcome! Here are some ways to improve this tool:

  • Add more automated checks
  • Support for other Git hosting services (GitLab, Bitbucket)
  • Check for GitHub API rate limits
  • Verify email directly via GitHub API
  • Add color output for better readability
  • Create web interface version

πŸ“ License

This tool is provided as-is for educational and troubleshooting purposes.

πŸ†˜ Support

If you encounter issues:

  1. Read the output carefully - The tool provides specific solutions
  2. Check all manual items - Some things can't be automated
  3. Wait 24-48 hours - Most common mistake is not waiting long enough
  4. Verify email - 90% of issues are unverified emails
  5. Check GitHub status - Visit GitHub Status

πŸ“ˆ Success Rate

Based on common contribution issues:

Issue Frequency Fixed By This Tool
Email not verified 90% βœ… Detects
Not on default branch 5% βœ… Fixes
Not pushed to GitHub 3% βœ… Detects
Need to wait longer 2% βœ… Explains

πŸŽ‰ Success Stories

This tool helps developers:

  • βœ… Fix missing contribution streaks
  • βœ… Ensure portfolio accuracy
  • βœ… Troubleshoot backdate scripts
  • βœ… Verify automation workflows
  • βœ… Debug contribution gaps

πŸ’‘ Pro Tips

  1. Run this tool BEFORE creating lots of commits
  2. Verify email FIRST - saves 24-48 hours of waiting
  3. Always work on default branch for open source contributions
  4. Enable private contributions if you work on private repos
  5. Be patient - GitHub stats are not real-time

πŸ”— Quick Links


Made with ❀️ for developers who want accurate contribution graphs!

Last Updated: October 2025

Version: 2.0.0 - Enhanced with professional visual formatting


FAQ

Q: Will backdated commits from last year show up?

A: Yes! If all checks pass and email is verified, backdated commits from any year will count in your stats.

Q: How long should I wait?

A: Graph updates in 5-30 minutes. Total stats can take 24-48 hours.

Q: What if I have multiple GitHub accounts?

A: Make sure you're checking the correct account. Email must be verified on the account you're pushing to.

Q: Can I run this tool on Windows?

A: Yes! Works on Windows, macOS, and Linux. Just need Python 3.6+.

Q: Does this work with GitHub Enterprise?

A: Yes, as long as you have Git configured and can access the repository.


⭐ If this tool helped you, consider starring the repository!

About

github stats checking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages