Last Updated: February 25, 2016
·
773
· gamebit07

Measuring LOCs you wrote in a day with git

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

or

git log --after=2013-06-30 --before=2013-07-1 --format=format: --shortstat master

or

git log --all --pretty=format:'%h %cd %s (%an)' --since='1 day ago'

or

git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short

--pretty="..." defines the format of the output.
%h is the abbreviated hash of the commit
%d are any decorations on that commit (e.g. branch heads or tags)
%ad is the author date
%s is the comment
%an is the author name
--graph informs git to display the commit tree in an ASCII graph layout
--date=short keeps the date format nice and short

1 Response
Add your response

git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"'

over 1 year ago ·