git:如何检索特定日期的所有文件 [英] git: how to retrieve all files as of a certain date

查看:240
本文介绍了git:如何检索特定日期的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确信这可以完成(?)(明确地说它会很简单)。 out-old-file-with-original-create-modified-timestamps>文件时间戳记不会被记录在像Git这样的DVCS中。

只有提交时间戳记在那里,您可以轻松签出

  git checkout master @ {1个月2周3天1小时1秒前} 

(注意:这样的结帐会给你一个 detached HEAD






在ClearCase中,只要将保留文件时间选项设置为true,就很容易实现
(如果没有,你实际上记录每个文件的签入时间,这有点像Git提交时间戳,除了每个文件)

I'm sure this can be done (?) (in clearcase it would be quite simple).

解决方案

Don't forget file timestamp are not recorded in a DVCS like Git.
Only commit timestamp are there, and you can checkout easily a commit from a certain date.

git checkout master@{1 month 2 weeks 3 days 1 hour 1 second ago}

(Note: such a checkout would give you a detached HEAD)


In ClearCase, this is easy provided you set the "preserve file time" option to true.
(if not, you actually record the checkin time of each file, which is a bit like the Git commit timestamp, except for every files)

这篇关于git:如何检索特定日期的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆