# git-counter **Repository Path**: binbin0915_admin/git-counter ## Basic Information - **Project Name**: git-counter - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-11-06 - **Last Updated**: 2025-11-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # πŸ“Š Git Code Statistics Tool
**A powerful and easy-to-use Git code contribution statistics tool** [![Python](https://img.shields.io/badge/Python-3.7+-blue.svg)](https://www.python.org/downloads/) [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)](https://github.com) [δΈ­ζ–‡ζ–‡ζ‘£](README.md) | English
--- ## 🎯 Pain Points Solved Have you ever encountered these problems in development? - ❓ **Performance Review**: Need to count personal or team code contributions to prove work achievements - ❓ **Project Evaluation**: Want to know each developer's actual contribution ratio in the project - ❓ **Code Review**: Need to quickly understand how much code a developer wrote and its quality - ❓ **Multi-Account Management**: Same person uses different Git accounts for commits, scattered statistics - ❓ **Report Generation**: Need to generate professional statistical reports for leaders or clients - ❓ **Code Quality**: Want to know if code was written once or went through extensive refactoring **This tool solves all the above problems in one stop!** πŸŽ‰ --- ## ✨ Core Features ### πŸ–₯️ Dual Mode Support - **GUI Interface** - Zero threshold, just click (Recommended) - **Command Line** - Suitable for automation scripts ### πŸ‘₯ Flexible User Configuration - **Auto Detection** - Read local Git repository configuration - **Manual Specification** - Support any username/email - **Multi-Account Stats** - Analyze multiple accounts at once - **Per-Account Mode** - Separate statistics for each account with automatic comparison ### πŸ“ˆ Dual Statistical Dimensions 1. **Cumulative Workload** - Based on `git diff`, counts code changes in commit history 2. **Current Code Amount** - Based on `git blame`, counts lines you actually own in current repo 3. **Work Efficiency Ratio** - Auto-calculate `Cumulative / Current`, evaluate code quality > **Efficiency Ratio Interpretation:** > - **> 150%**: Extensive refactoring and optimization (high quality) > - **110-150%**: Moderate refactoring, stable code > - **90-110%**: Written once, few changes > - **< 90%**: Possibly rewrote a lot of others' code ### 🎨 Beautiful Report Export - **HTML Report** - Visual charts (pie chart, comparison table), professional - **Excel Report** - Multi-sheet (summary, details, per-account, comparison) - **Text Report** - Console preview, quick view ### 🧠 Smart Analysis - **Auto Exclude Comments** - Support 20+ programming languages - **Frontend/Backend Classification** - Auto-identify file types - **File-Level Statistics** - Detailed lines for each file + leaderboard - **Smart Cache** - Auto-cache results, greatly improve analysis speed --- ## πŸš€ Quick Start ### Method 1: Use Packaged EXE (Recommended, no Python required) 1. Download [Latest Release](https://github.com/your-username/git-counter/releases) 2. Double-click `GitCounter.exe` 3. Select repository β†’ Start analysis β†’ Export report **That simple!** πŸŽ‰ ### Method 2: Run from Source ```bash # Clone repository git clone https://github.com/your-username/git-counter.git cd git-counter # Install dependencies pip install -r requirements.txt # Run GUI version python git_counter_gui.py ``` --- ## πŸ’‘ Use Cases ### Scenario 1: Personal Performance Review - Export HTML report for annual review - Visualize code contributions clearly ### Scenario 2: Team Contribution Comparison - Input all team members' Git accounts - Select "Detailed Mode" - Get comparison table + pie chart ### Scenario 3: Code Quality Assessment - Check "Work Efficiency Ratio" - Compare "Cumulative" vs "Current" - Evaluate refactoring extent ### Scenario 4: Multi-Account Merge Statistics - Input multiple Git accounts - Select "Summary Mode" - Auto-merge all contributions --- ## πŸ“š Documentation - [πŸ“– User Guide](δ½Ώη”¨ζŒ‡ε—.md) (Chinese) - [πŸ”§ Developer Docs](开发文摣.md) (Chinese) - [πŸ“ Statistics Principle](STATISTICS_PRINCIPLE.md) (Chinese) --- ## πŸ› οΈ Tech Stack - **Core**: Python 3.7+ - **GUI**: Tkinter (standard library) - **Git Operations**: GitPython - **Excel Export**: openpyxl - **Packaging**: PyInstaller --- ## 🀝 Contributing Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for details. --- ## πŸ“ Changelog ### v2.3.0 (2025-11-03) - ✨ Added: Smart cache mechanism - ✨ Added: Cache validation (detect new commits, branch switch, etc.) - πŸ› Fixed: Dependency issues when packaging EXE - πŸ”§ Optimized: Cache directory moved to user home --- ## πŸ“„ License [MIT License](LICENSE) Β© 2025 ---
**If you find this helpful, please give it a Star ⭐** Made with ❀️ by [Your Name](https://github.com/your-username)