Skip to content

miasus-agentic/git-commit-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Commit Stats

A CLI tool that analyzes git commit patterns and generates beautiful statistics about your repository history.

Features

  • 📊 Commit frequency analysis by day, week, and month
  • 👥 Top contributors with commit counts
  • ⏰ Commit time distribution (find your most productive hours)
  • 📅 Commit activity heatmap data
  • 📈 Lines changed statistics
  • 🏷️ File type breakdown

Installation

pip install -r requirements.txt

Usage

Run in any git repository:

python git_commit_stats.py

Or analyze a specific repository:

python git_commit_stats.py /path/to/repo

Options

  • --days N - Analyze last N days (default: 365)
  • --author NAME - Filter by author
  • --format json|text - Output format (default: text)
  • --export FILE - Export results to file

Examples

# Analyze last 90 days
python git_commit_stats.py --days 90

# Get stats for specific author
python git_commit_stats.py --author "John Doe"

# Export to JSON
python git_commit_stats.py --format json --export stats.json

Sample Output

📊 Git Commit Statistics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Repository: my-project
Period: Last 365 days
Total Commits: 1,247

👥 Top Contributors
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Alice Smith        523 commits (41.9%)
2. Bob Johnson        312 commits (25.0%)
3. Carol Williams     198 commits (15.9%)

⏰ Most Active Hours
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14:00-15:00  ████████████████████ 156 commits
15:00-16:00  ██████████████████ 142 commits
10:00-11:00  ████████████████ 128 commits

📅 Busiest Days
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Monday      ████████████████████ 267 commits
Tuesday     ██████████████████ 245 commits
Wednesday   ████████████████ 223 commits

Requirements

  • Python 3.7+
  • Git installed and accessible in PATH

License

MIT License

About

A CLI tool that analyzes git commit patterns and generates beautiful statistics about your repository history

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages