On GitHub, can I fork just a wiki?

早过忘川 提交于 2019-11-29 05:00:50

问题


If I fork repository joe/foo, and it has a Wiki, I won't get the wiki. Right now I'm just interested in forking the wiki to add pages to it.

  1. Is that possible without forking the repository?

  2. If not, is it possible at all?


回答1:


You can't fork it directly on GitHub, but you can get Git access to it by going into the Git access tab of the wiki and you should be able to fork it on your local machine and edit it as much as you want (and even get updates to it!)




回答2:


You are able to just clone a Wiki from a repo now. You can find a tab called Git Access under Wiki tab of a repo.

But you still can not fork a wiki without forking its project repo.




回答3:


If you're making your own wiki that others would be interested in forking, you could do something like we did for the RailsConf 2012 wiki.

We made a local clone of the wiki and then did git push --force to the "code" repository. It gets a little out of sync, but that's easy to rectify.




回答4:


In June 2019, here's how I did that:

  1. Fork a repo. The wiki is not forked automatically. So your fork will have empty wiki.
  2. Create a wiki in the forked repo. Just create an empty Home page or whatever.
  3. Clone the git repo of original wiki: git clone https://github.com/org-a/project-x.wiki.git
  4. Assuming your forked repo now sits in https://github.com/org-b/project-x, add the new remote to the wiki repo: git remote add fork https://github.com/org-b/project-x.wiki.git
  5. Do the force push to overwrite your wiki with the original git push -f fork master

Great. Now you have forked a repo and its wiki.

(By the way, Github should do this automatically, right?)




回答5:


As of 30 March 2016, you can just create a new "Home" Wiki page and the wiki pages for the forked repository will show up in your fork once the new Home page is created (provided that you have forked the parent repository).



来源:https://stackoverflow.com/questions/7197937/on-github-can-i-fork-just-a-wiki

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!