在github中分叉,克隆并推送wiki

phi*_*hil 11 git wiki github git-clone

我多次搜索这个问题,但仍然无法解决它.

假设我从user1分叉一个repo(命名为repo1),现在我想分叉repo1的wikipage,当你分叉回购时,github不会为你做这个.

我试过了:

    git clone https://github.com/user1/repo1.wiki.git
    git remote add my-fork https://github.com/myid/repo1.wiki.git
    git push my-fork master
Run Code Online (Sandbox Code Playgroud)

但终端说:

    fatal: remote error: access denied or repository not exported: /3/nw/32/2b/9e/135236793/71478887.wiki.git
Run Code Online (Sandbox Code Playgroud)

这意味着我无法成功地将这个本地wiki推送到我的分叉回购的wikipage.

有没有人对这里发生的事情有所了解?

谢谢.

PS:使用自定义wiki的Fork GitHub项目

raf*_*ner 12

你需要先在你的github帐户中创建wiki打开浏览器

https://github.com/myid/repo1/wiki
Run Code Online (Sandbox Code Playgroud)

按创建第一页并保存 创建维基 现在你可以推(第一次推送应该是-f)

git push my-fork -f
Run Code Online (Sandbox Code Playgroud)

  • 我提交了一个 github 支持请求,将此信息添加到 [github 关于从命令行使用 wiki 的支持页面](https://help.github.com/articles/adding-and-editing-wiki-pages-locally /) 因为它没有提到需要首先通过其 Web 界面引导 wiki 页面。 (2认同)