在GitHub.com上有一种简单的方法来查找存储库的创建日期吗? [英] Is there an easy way on GitHub.com to find a repository's creation date?
问题描述
在GitHub.com上有一种简单的方法来查找存储库的创建日期吗?我正在比较多个项目,并且如果可能的话,宁愿不检查每个项目.
Is there a easy way on GitHub.com to find a repositories creation date? I'm comparing a number of projects and would rather not check each of them out if possible.
推荐答案
如果按创建日期"表示您是在什么时候由 在GitHub 上首次创建回购协议的使用New Repo
或分叉存储库,则可以通过 GitHub API 获取该信息. a>:
If, by "creation date", you mean when a repo was first created on GitHub by either using New Repo
or forking a repo, then you can get that information through the GitHub API:
curl https://api.github.com/repos/<owner>/<repo> | grep created_at
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4944 100 4944 0 0 8337 0 --:--:-- --:--:-- --:--:-- 8337
"created_at": "2014-04-21T05:03:30Z",
上面的命令假定您可以从命令行访问curl
和grep
工具.如果您使用的是Windows,则grep
的等效项是findstr
.
The command above assumes that you have access to the curl
and grep
tools from the command-line. If you're using Windows, an equivalent to grep
is findstr
.
注意created_at
日期时间戳.它位于UTC中(这就是Z
的意思),它说该存储库是在GitHub于2014年4月21日在utc上于 st 创建的.
Notice the created_at
date-time stamp. It's in UTC (that's what the Z
means), and it says that the repo was created on GitHub on April 21st, 2014, at 05:03:30 UTC.
还请注意,这 与首次提交的作者和提交者日期不同 .要获得这些,只需使用git log
作为所讨论的回购协议:
Also note that this is not the same as the author and committer dates of the initial commit. To get those, simply use git log
for the repo in question:
git log --reverse --format=fuller
这篇关于在GitHub.com上有一种简单的方法来查找存储库的创建日期吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!