简体   繁体   English

如何获取git提交的最后更改日期?

[英]How to get the last change date of a git commit?

git log will show the original commit date even if the commit gets amended or rebased.即使提交被修改或重新定位,git log 也会显示原始提交日期。 Is it possible to show the time of last such operation?是否可以显示上次此类操作的时间?

git stores two dates on a commit: author date and commit date. git 在提交时存储两个日期:作者日期和提交日期。 By default, the author date is shown.默认情况下,显示作者日期。 git log --format=fuller shows both. git log --format=fuller显示两者。 Also, git log --format=format:%ad%cd will show the author date and the commit date respectively, there are many options for both, see man git log for more.此外, git log --format=format:%ad%cd将分别显示作者日期和提交日期,两者都有很多选项,请参阅man git log了解更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM