[英]Using git cli, how can I get the date and time of the latest commit of a repository that I have access to but have not cloned?
I need to check the datetime of the latest commit of a repo I will not have cloned, but do have access to via ssh keys. 我需要检查将不会克隆但可以通过ssh密钥访问的最新回购提交的日期时间。
EDIT: just realized my question was imprecise and is not the question I needed to ask. 编辑:刚刚意识到我的问题是不精确的,不是我需要问的问题。 Closing this and will ask again. 关闭此窗口,然后再次询问。
Clone and try a git log --all --date-order -n 1 --pretty=format:%cd
. 克隆并尝试git log --all --date-order -n 1 --pretty=format:%cd
。 Note that there are many date formats, see https://git-scm.com/docs/pretty-formats . 请注意,日期格式很多,请参见https://git-scm.com/docs/pretty-formats 。
If you don't want to clone the entire repo, try using --depth flag on the clone to limit the history you are pulling down. 如果您不想克隆整个存储库,请尝试在克隆上使用--depth标志来限制要提取的历史记录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.