The TL;DR version of Marek R's answer is that the @{date}
syntax is unable to do what you want; don't try to use it for this purpose.
The link in evolutionxbox's comment goes to a rather old question whose answer contains most of what you need, though git whatchanged
has been deprecated in favor of git log --raw
. The accepted answer has the key notion: --since
(and --until
, if you want it) is the way to do commit limiting by date.
You did however also specify a certain file (with the -- pathspec
option). Be aware that when using this with git log
, Git will perform History Simplification, which will prune entire sub-graphs as it walks the Git commit graph. Essentially, upon encountering a merge, Git will prune away any leg of the merge that doesn't match the then-current version of the file, unless that takes all legs of the merge. That is, suppose we have:
...--o--o--◎
\
M--o--...
/
...--o--o--●
where commits ◎
and ●
were merged to make commit M
. In commit M
, there is a file named file
. This file appears in both ◎
and ●
. The copy in ◎
, however, exactly matches the copy in M
, while the copy in ●
is different. The git log
command, with the default history simplification turned on, will follow the top row of this diagram and completely ignore the bottom row.
This is because Git thinks you are looking for commits that resulted in the version of the file you see in commit M
. That is: how did we get this version of the file? We got it because commit M
completely ignored the branch that led up to the version that appears in commit ●
, so git log
should likewise ignore that branch.
If this is what you want, that's good! If not, be sure to use extra git log
options to control or defeat the history simplification. (The most straightforward option is --full-history
, which does what it says.)