如何检查执行的最新`git pull`的日期和时间? [英] How do I check the date and time of the latest `git pull` that was executed?

查看:118
本文介绍了如何检查执行的最新`git pull`的日期和时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查执行的最新 git pull 的日期和时间?我经常需要知道在出现问题时服务器上的代码发生了何种变化。 git show 命令显示最近提交的日期。这不是提交提交到本地存储库的日期,但Git不保留这样的提取信息。



您可能能够找到时间使用服务器上文件的ctime(创建时间)进行最后一次拉动。例如:

  ls -lct 

显示每个文件的ctime,按最近的第一个排序。


How do I check the date and time of the latest git pull that was executed? I frequently need to know when the code changed on a server when something goes wrong.

解决方案

The git show command shows the date of the most recent commit. This isn't the date at which the commit was pulled to the local repository, but Git doesn't keep such pull information.

You may be able to find the time of the last pull using the ctime (creation time) of the files on the server. For example:

ls -lct

shows the ctime of each file, sorted with the most recent first.

这篇关于如何检查执行的最新`git pull`的日期和时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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