from git log --help
你可以看到这个:
--since=<date>, --after=<date>
Show commits more recent than a specific date.
--until=<date>, --before=<date>
Show commits older than a specific date.
你也有--no-merges
标志丢弃由于拉取而应用的提交。
所以,你可以尝试:
git log --after=<date> --before=<date> --no-merges
但你也可以尝试:
git log --graph
查看完整的提交“树”。
--EDIT
也许您真正想要的不是日期范围,而是版本范围。从联机帮助页中可以看到这一点:
<revision range>
Show only commits in the specified revision range. When no
<revision range> is specified, it defaults to HEAD (i.e. the
whole history leading to the current commit). origin..HEAD specifies all
the commits reachable from the current commit (i.e. HEAD), but
not from origin. For a complete list of ways to spell <revision range>,
see the Specifying Ranges section of gitrevisions(7).
因此,您可以选择要开始范围的提交 id 和要结束范围的提交 id,可以是:
git log from_commit_id..HEAD
如果您想查看从一次提交开始到您现在所在位置的所有提交。不要忘记使用(或结合)--graph
无论如何,它都会为您提供全貌的标志。