git检查提交被推送的时间 [英] git inspect time at which commit was pushed

查看:144
本文介绍了git检查提交被推送的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何知道在特定时间在git存储库中存在哪个版本?



假设我有一个共享存储库,几个用户可以推送更改,并且我想在过去某个特定日子的12:00时冻结快照。

如果有人在11:30进行本地提交,但只将其推送到中央仓库在12:30,我可以在以后检测到吗?



我可以检测到在12:00之后的某个人是否执行了本地提交以记录提交日期上午11点30分,然后推上游?

解决方案

Git本身并没有跟踪这些信息,但我能够查看服务器本身的git仓库中的objects目录中的提交对象文件上的文件创建时间戳。


How can I tell what version was present in a git repository at a given time?

Say I have a shared repository into which several users can push changes, and I want to freeze a snapshot at 12:00 on a given day in the past.

If someone makes a local commit at 11:30, but only pushes it to the central repos at 12:30, can I detect that later on?

Can I detect if someone acting after 12:00 has doctored a local commit to have a recorded commit date of 11:30, and then pushed that upstream?

解决方案

Git itself doesn't track this information, but I was able to look at the file creation timestamp on the commit object file in the "objects" directory in the git repository on the server itself.

这篇关于git检查提交被推送的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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