git: Log for 'master' only goes back to date bug?

回眸只為那壹抹淺笑 提交于 2020-01-01 08:28:07

问题


When I do the following in my working copy:

> git diff 'master@{1 hour ago}'

It prints

warning: Log for 'master' only goes back to Thu, 14 Jan 2016 15:37:11 -0500.

Yet when I do git log master, it clearly goes back farther:

commit bb9c80fb1c3895a9c11f7a60710497cc8406e71f
Author: Andy Edwards <andy@example.com>
Date:   Tue Jan 12 22:44:21 2016 -0600
...

Am I doing something wrong, or is this a git bug?


回答1:


Use git-whatchanged instead.

git whatchanged --since="1 hour ago" --patch


来源:https://stackoverflow.com/questions/34799426/git-log-for-master-only-goes-back-to-date-bug

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!