Tabraiz Ali
Tabraiz Ali

Reputation: 677

How to find number of commits done to a file across a repository

i was looking at a video "Treat Your Code as a Crime Scene".

http://www.infoq.com/presentations/code-bugs-legacy-pitfalls

inorder to know the complexity of the code he says to find the the number of commits done over to each file.This means that those file need more maintainance. how do i find hotspot like this guy done in this video.

This is between 13:20 - 14:20 in that video.

Treat Your code as crime scene

Treat you code as crime scene 2

Upvotes: 4

Views: 1348

Answers (1)

VonC
VonC

Reputation: 1328522

Following "How to count number of commits per file pathname by author in a Git repository?", you can start with:

git log --name-only --pretty=format: | sort | uniq -c | sort

The sorted list will help you spot the files with a lot of commits.

Upvotes: 3

Related Questions