How to get diff
for specified user between two dates from git? Or, how to use git whatchanged
command to list commits for specified user?
Is there any none-scripting way (builtin git command)?
How to get diff
for specified user between two dates from git? Or, how to use git whatchanged
command to list commits for specified user?
Is there any none-scripting way (builtin git command)?
I believe there's no such a way to get a diff only knowing dates.
As of today you can do the following:
git log --since "OCT 4 2011" --until "OCT 11 2011" --pretty=format:"%H"
And then git diff
between first and last revisions. If the revision list is far too long, use the above git log ...
with | head -1
and | tail -1
to get the first and the last revisions.
Note that the above git log will return revisions exactly between given dates, i.e. revisions for OCT 5, OCT 6, ..., OCT 10.
This is possible, and with the user / committer criteria:
git log --after="2015-10-14" --before="2015-10-21" --grep="MB[FT][0-9-]*" --author="John\|Mary"
This will match anything
John
or Mary
MBT
or MBF
plus a number-code that can include a -
char.git log --since "MAY 1 2017" --until "MAY 31 2017" -p --author="Jack" > diffJackMay.patch