Analyze git commits with detailed per-file line statistics and running totals. See exactly how your codebase evolved over time!
- 📊 Detailed commit analysis: Insertions, deletions, and total lines per commit
- 📈 Running totals: Track how file line counts evolved over time
- 🎨 Beautiful terminal output: Color-coded statistics for easy scanning
- 📁 Per-file breakdown: See which files changed the most in each commit
- 🏆 Summary statistics: Top files by line count with visual progress bars
- 🔄 Chronological order: Commits processed from oldest to newest
- 🚫 Smart color handling: Disables colors when output is piped
pip install gitlinesgit clone https://github.com/saurabhv749/gitlines.git
cd gitlines
pip install -e .Navigate to any git repository and run:
gitlinesThis will output a detailed analysis of every commit, including:
- Commit hash and date
- Total insertions and deletions
- Running total of lines in repository
- Per-file breakdown for each commit
- Summary statistics and top files
- Fetches all commits in chronological order (oldest → newest)
- For each commit:
- Gets file-level insertions and deletions using
git show --numstat - Updates running total for each file
- Displays statistics with color-coded output
- Gets file-level insertions and deletions using
- Shows final summary with top files by line count
- Python 3.8+
- Git (installed and in PATH)
- Any operating system: macOS, Linux, Windows
Currently gitlines has no command-line flags. Run it from any directory inside a git repository.
Future versions may support:
--no-color- Disable colored output--json- Output as JSON--since <date>- Analyze commits since specific date--until <date>- Analyze commits until specific date
Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Created with ❤️ for developers who want to understand their codebases better.
- Initial release
- Commit analysis with per-file statistics
- Color-coded terminal output
- Running line count tracking

