There's more...

We have used git log, git diff, and git shortlog to find information about the repository, but there are so many options for those commands on how to find bottlenecks in the source code.

If we want to find the files with the most commits, and these are not necessarily the files with the most line additions or deletions, we can use git log:

  1. We can use git log between the origin/stable-3.1 and origin/stable-3.2 branches and list all the files changed in each commit. Then, we just need to sort and accumulate the result with some Bash tools as follows:
$ git log origin/stable-3.1..origin/stable-3.2 --format=format: --name-only 
 
org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF 
org.eclipse.jgit.ant.test/pom.xml 
  1. First, we are ...

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.