How to see how many lines of codes were changed in a day with git

If you want to know how many files and how many lines of code were changed for the day, simply run the following command:

git diff --stat "@{1 day ago}" 

This will output a list of all changed files along with the number of lines added and removed, as well as a total for all files combined.

Naturally, you can also use different time intervals:

git diff --stat "@{2 weeks ago}" 

Although measuring productivity by counting lines of code is a rather ludicrous idea, it can give you an idea of how much has changed in a given period of time

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see