Skip to content

tddworks/git-changes-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Git Changes Analyzer πŸ“Š

License: Apache 2.0 Bash Version PRs Welcome

An interactive command-line tool for analyzing Git repository changes, generating reports, and gaining insights into your codebase evolution.

✨ Features

  • πŸ“ˆ Commit Analytics - Comprehensive commit statistics and summaries
  • πŸ‘₯ Author Insights - Detailed breakdown of contributions by author
  • πŸ“ File Hotspots - Identify frequently modified files
  • 🏷️ Commit Type Analysis - Analyze conventional commit patterns
  • πŸ” Detailed Commit Viewer - Deep dive into specific commits
  • πŸ“„ Report Generation - Export analysis to markdown format
  • ⏱️ Flexible Time Ranges - Analyze any time period
  • πŸ”„ Live Updates - Refresh git data on demand

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/tddworks/git-changes-analyzer.git
cd git-changes-analyzer

# Make the script executable
chmod +x git-changes-analyzer.sh

# Optional: Add to PATH for global access
sudo ln -s $(pwd)/git-changes-analyzer.sh /usr/local/bin/git-analyzer

Basic Usage

# Interactive mode (recommended)
./git-changes-analyzer.sh

# Quick summary of today's changes
./git-changes-analyzer.sh --summary

# Generate a report for the last 7 days
./git-changes-analyzer.sh --days 7 --report

# Show help
./git-changes-analyzer.sh --help

πŸ“– Documentation

Interactive Menu Options

Option Description Use Case
1. Summary Overall repository statistics Daily standup, quick overview
2. By Author Commits grouped by contributor Team performance, code review
3. File Changes Most frequently modified files Identify technical debt, hotspots
4. Commit Types Distribution of feat/fix/docs Process compliance, quality metrics
5. Commit Details Examine specific commits Debugging, detailed investigation
6. Generate Report Export to markdown Documentation, team meetings
7. Change Time Range Adjust analysis period Sprint reviews, custom periods
8. Refresh Update git data Sync with remote changes
9. Quit Exit the program -

Command Line Options

git-changes-analyzer.sh [OPTIONS]

Options:
  --help, -h        Show help message
  --days N          Analyze last N days (default: 1)
  --summary         Show summary and exit
  --report          Generate report and exit

Examples

Daily Standup Report

# What did the team do yesterday?
./git-changes-analyzer.sh --days 1 --summary

Weekly Sprint Review

# Interactive analysis for sprint review
./git-changes-analyzer.sh --days 7
# Then select option 6 to generate report

Individual Contributor Analysis

# Use interactive mode
./git-changes-analyzer.sh
# Select option 2 to see commits by author

Technical Debt Identification

# Find files that need refactoring
./git-changes-analyzer.sh
# Select option 3 to see most changed files

🎨 Output Format

Color Coding

  • πŸ”΅ Blue: Headers and titles
  • 🟒 Green: Success messages and author names
  • 🟑 Yellow: Prompts and warnings
  • πŸ”· Cyan: Section headers and statistics
  • πŸ”΄ Red: Errors and invalid inputs

Report Structure

Generated reports include:

  • Repository metadata
  • Time-based statistics
  • Author contributions
  • Detailed commit history
  • File change analysis

πŸ› οΈ Requirements

  • Git 2.0 or higher
  • Bash 4.0 or higher
  • Standard Unix tools: awk, sed, sort, uniq
  • Terminal with color support (most modern terminals)

Checking Requirements

# Check bash version
bash --version

# Check git version
git --version

# Test color support
echo -e "\033[0;32mGreen text test\033[0m"

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

# Fork and clone the repository
git clone https://github.com/tddworks/git-changes-analyzer.git
cd git-changes-analyzer

# Create a feature branch
git checkout -b feature/your-feature-name

# Make your changes
vim git-changes-analyzer.sh

# Test your changes
./test.sh

# Commit and push
git add .
git commit -m "feat: add amazing feature"
git push origin feature/your-feature-name

Code Style

  • Use 4 spaces for indentation
  • Add comments for complex logic
  • Follow existing naming conventions
  • Test thoroughly before submitting PR

πŸ“‹ Roadmap

  • Add support for custom date ranges
  • Export to multiple formats (JSON, CSV)
  • Integration with CI/CD pipelines
  • Web-based dashboard
  • Git hook integration
  • Performance metrics analysis
  • Branch comparison features
  • Team velocity tracking

πŸ› Troubleshooting

Common Issues

"Not in a git repository" Error

# Ensure you're in a git repository
git status

No Commits Found

# Check if repository has commits in the time range
git log --oneline --since="1 day ago"

Permission Denied

# Make script executable
chmod +x git-changes-analyzer.sh

Colors Not Displaying

# Check terminal color support
echo $TERM
# Should show something like: xterm-256color

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by the need for better git analytics tools
  • Built with love for the developer community
  • Special thanks to all contributors

πŸ“ž Support

⭐ Star History

Star History Chart


Made with ❀️ by TDDWorks

If you find this tool helpful, please consider giving it a ⭐ on GitHub!

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages