简体   繁体   English

如何找到创建存储库的提交?

[英]How can i find the commit that created the repository?

How can i find the history of the repo to find out when it was created?我如何找到回购的历史以找出它的创建时间?

I have found commands that showcase the log history but it is too large and so was wondering how i can find the first date it was created instead?我找到了显示日志历史记录的命令,但它太大了,所以想知道如何找到它的第一个创建日期?

git log --max-parents=0

will output (among other info) the date of the repo's older commit, the only one* without parent.将 output (以及其他信息)回购的较旧提交的日期,唯一一个*没有父母。

(* in most cases. But, as ElpieKay reminded us in his comment below, beware that in some more complex repositories, one can have orphan branches. If more than one commit pops out here, compare dates and maybe update your question to add the related output) (* 在大多数情况下。但是,正如 ElpieKay 在下面的评论中提醒我们的那样,请注意,在一些更复杂的存储库中,可能会有孤立分支。如果此处弹出多个提交,请比较日期并更新您的问题以添加相关输出)

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

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