Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

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

closed as off topic by psusi, Lekensteyn, htorque, jrg, RolandiXor Jan 8 '12 at 23:46

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

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

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