Git - How can I list all files changed on the master branch between two times? [duplicate]

天涯浪子 提交于 2019-12-10 10:33:09

问题


I'd like to find out all the files that have been modified on the master branch (or any one branch for that matter) between two dates.

I understand, from this post (How to list the file names only that changed between two commits?) that I can use

git diff --name-only SHA1 SHA2

but I don't know, a priori, what the SHA's are between today and yesterday. Especially when there can be more than one commit on a day.

To be more precise, I would like to know the list of files changed on the master git repo between Today at 12:01 AM and yesterday at 12:01 AM.

Is this possible? I used to be able to do this in CVS with cvs diff -D "1 days ago".


回答1:


git has a facility for using the reflog to get the position a name was at an arbitrary amount of time ago.

git diff --name-only master@{1 day ago} master

This will give you the difference between where master was exactly one day prior to now, and where master is now.



来源:https://stackoverflow.com/questions/14863735/git-how-can-i-list-all-files-changed-on-the-master-branch-between-two-times

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