简体   繁体   English

使用git cli,如何获取我有权访问但尚未克隆的存储库的最新提交日期和时间?

[英]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.

相关问题 如何获取我之前克隆的git存储库? - How to get the git repository that I cloned before? 如何确保git存储库中的所有Java项目都具有最新或所需的maven依赖项版本? - How can i ensure all my java projects in a git repository have latest or desired version of maven dependency? 如何将文件从本地计算机添加到已克隆的本地git存储库中? - How do I add a file from my local machine to a local git repository that I have cloned? 如何从 git 存储库获取上次提交日期? - How do I get last commit date from git repository? git clone - 我怎么压制“你似乎克隆了一个空的存储库”警告? - git clone - how do I supress the “You appear to have cloned an empty repository” warning? 如何使用 git CLI 获取最新版本 - how can I use git CLI to get the latest release 我的Git储存库已完成,并将其克隆到我的计算机上。 我要删除它,还是基本上完成该操作? - I'm done with my Git repository, and I have it cloned to my computer. Do I delete it, or how do I basically be done with it? 我可以在自己的存储库中有一个克隆的git存储库吗? - Can I have a cloned git repo inside my own repo? “裸”git存储库:我怎样才能让Apache总是“看到”最新的提交? - “Bare” git repository: how can I let Apache always “see” the latest commit? 如何获得克隆存储库的上游存储库? - How can I get the upstream repository of a cloned repository?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM