dotnet-hotspots is a .NET global tool that analyzes your Git repository's commit history to identify the most frequently changed files β often a sign of bug-prone areas, architectural bottlenecks, or critical business logic that needs extra attention.
Top 10 Hot Files β Code Files Only
================================================================================
Rank Changes File Path
--------------------------------------------------------------------------------
1 312 src/Services/UserService.cs
2 287 src/Data/ApplicationDbContext.cs
3 201 src/Controllers/AuthController.cs
4 198 src/Services/OrderService.cs
5 176 src/Models/User.cs
6 154 src/Services/PaymentService.cs
7 143 src/Controllers/OrderController.cs
8 121 src/Repositories/UserRepository.cs
9 115 src/Services/EmailService.cs
10 98 src/Models/Order.cs
================================================================================
Code files found: 143 | Total files in repo: 381 | Use --all to see everything
Install as a .NET global tool:
dotnet tool install --global dotnet-hotspots-toolNavigate to any Git repository and run:
dotnet-hotspotsThat's it! You'll see the top 30 most frequently changed files.
dotnet-hotspots --10Note:
--<number>accepts any positive integer β--10,--50,--100, etc. Without this flag the default is top 30.
dotnet-hotspots --50dotnet-hotspots --alldotnet-hotspots --helpdotnet-hotspots --version- .NET 8.0+ (for installation)
- Git repository (the tool analyzes Git history)
- Works on Windows, macOS, and Linux
dotnet tool install --global dotnet-hotspots-tooldotnet tool update --global dotnet-hotspots-tooldotnet tool uninstall --global dotnet-hotspots-tooldotnet tool install dotnet-hotspots-tooldotnet-hotspots analyzes your repository's commit history using git log to:
- Extract file paths from all commits
- Count occurrences of each file across commits
- Rank files by frequency of changes
- Display results in a clean, readable format
The tool focuses on commit frequency rather than lines changed, giving you insight into which files require the most attention from developers.
By default, dotnet-hotspots filters out non-code files so the results focus on what matters. Use --all to disable filtering and see everything.
Excluded folders:
bin, obj, dist, build, publish, packages, .git, .vs, .idea, .nuget, .vscode, node_modules
Excluded extensions:
.md, .txt, .pdf, .log, .lock, .sum
Excluded files:
.gitignore, .gitattributes, .editorconfig, .csharpierignore, .dockerignore, .env, Makefile, LICENSE, Dockerfile (and Dockerfile.* variants)
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Any issues or suggestions, please create an issue on Github.
Donations are welcome to appreciate my work and to keep this project alive, but isn't required at all.
