查找文件首次添加到Git存储库的日期/时间 [英] Finding the date/time a file was first added to a Git repository
本文介绍了查找文件首次添加到Git存储库的日期/时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有简单的 Git 命令来确定以下内容的创建日期"存储库中的文件,即文件的首次添加日期?
Is there a simple Git command to determine the "creation date" of a file in a repository, i.e. the date it was first added?
最好甚至可以通过文件重命名/移动来确定这一点.我希望它是计算机可读的单行输出.可能是我没有找出正确的 git log< fname>
选项来执行此操作.
It would be best if it can determine this even through file renames/moves. I'd like it to be a computer-readable one-line output; it may be that I haven't figured out the correct git log <fname>
options to do this.
推荐答案
git log --format =%aD< FILE>|尾巴-1
使用此命令,您可以找出有关该文件的所有日期并提取最后一个
With this command you can out all date about this file and extract the last
这篇关于查找文件首次添加到Git存储库的日期/时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文