1

If I clone a Github Repository , I do normally a git clone https://github.com/:username/:repo_name.git. But now I've wanted to download the bare-Repo with wgetbut it only returns the webpage. How can I download a git repo with http? I thought this is git over http that indeed is only a git repo served over http. But what's wrong with this request. I thought the git client do the same. Even fetch the repo with GET.

I'm grateful for any answer!

4

2 回答 2

1

您可以git clone --bare将存储库克隆为裸存储库

于 2014-07-01T16:41:58.703 回答
0

你可以得到一个存档(意思不是完整的历史)

wget https://github.com/username/reponame/tarball/master

这是GitHub 内容 API的一部分:

GET /repos/:owner/:repo/:archive_format/:ref

和:

  • archive_format字符串:可以是 tarball 或 zipball。
    默认:tarball
  • ref字符串:有效的 Git 引用。
    默认:存储库的默认分支(通常master
于 2014-06-30T17:51:50.967 回答