通过curl命令获取最后一个提交ID到git repo URL

时间:2013-10-04 09:34:55

标签: git curl git-commit

如何调用文档https://git.appfactorypreview.wso2.com/history/apiapp.git/中显示的网址http://developer.github.com/v3/repos/commits/?我的意思是,我必须给出什么是CURL命令?

1 个答案:

答案 0 :(得分:1)

git 的github REST api ,仅适用于 github.com git 是一个分布式版本控制系统,而 github.com 是一个源代码托管服务。

你给的回购网址不是来自github。所以github API在这里不起作用。您可以做的是在目录中克隆repo并调用git log -n 1