请注意,自 2013 年 4 月 30 日起,当您在 github.com 上查看带有子模块的存储库时,您会获得该子模块的有用链接和信息:
您现在可以看到子模块指向的确切引用。
存储库内容 API将反映该 SHA1。
curl https://api.github.com/repos/jquery/jquery/contents/test/qunit
{
"name": "qunit",
"path": "test/qunit",
"type": "submodule",
"submodule_git_url": "git://github.com/jquery/qunit.git",
"sha": "6ca3721222109997540bd6d9ccd396902e0ad2f9",
"size": 0,
"url": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master",
"git_url": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9",
"html_url": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9",
"_links": {
"self": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master",
"git": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9",
"html": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9"
}
}