I have to display the number of lines added(and deleted) to a certain file by all commits.

link|improve this question
2  
slightly off topic isn't it. – rlemon Jan 4 at 21:53
1  
I 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 5 at 15:50
@StefanoPalazzo: i think you're right, i've removed my comment. – tohuwawohu Jan 5 at 17:09
I closed on a whim :(... foey. I think this should be reopened. – Roland Taylor Jan 8 at 23:47
feedback

closed as off topic by psusi, Lekensteyn, htorque, jrg, Roland Taylor Jan 8 at 23:46

Questions on Ask Ubuntu - Stack Exchange are expected to generally relate to Ubuntu, within the scope defined in the faq.

1 Answer

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]
link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.