-2

How do you get the total number of previous commits that made changes to a file in git?

Liam
  • 25,247
  • 27
  • 110
  • 174
  • 1
    Does this answer your question? [Getting a commit count for each file in a git repository](https://stackoverflow.com/questions/51902038/getting-a-commit-count-for-each-file-in-a-git-repository) – Liam Feb 25 '22 at 12:04

1 Answers1

1

For "The number of commits that changed a file", and assuming that you have access to a linux like terminal.

You can use git log --pretty=format:"%H" <PATH> | wc

See https://www.geeksforgeeks.org/how-to-check-git-logs/