I have to display the number of lines added(and deleted) to a certain file by all commits.
Asked
Active
Viewed 6,951 times
7
-
2slightly off topic isn't it. – rlemon Jan 04 '12 at 21:53
-
2I think this question is fine. It's no more off-topic than a question about Firefox, Gedit, or unrar, isn't it? (Programmers, by the way, is the wrong site - via their FAQ: "not about [...] programming tools (ask on Stack Overflow instead)") – Stefano Palazzo Jan 05 '12 at 15:50
-
@StefanoPalazzo: i think you're right, i've removed my comment. – tohuwawohu Jan 05 '12 at 17:09
-
I closed on a whim :(... foey. I think this should be reopened. – RolandiXor Jan 08 '12 at 23:47
1 Answers
8
Use git log --numstat --oneline <Filename>
. This will give you a list of commits for file <Filename>
, with two lines for each commit, using this syntax:
[sha hash] [commit title line]
[lines added] [lines removed] [path to file in repository]

tohuwawohu
- 7,352