Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a private github's wiki public

Tags:

git

github

So I have a private repository on GitHub but would like to make the Wiki public so anyone can see it.

Is this possible?

like image 808
William Hodges Avatar asked May 08 '15 10:05

William Hodges


People also ask

How do I make my wiki public?

Configuring the Private/Public Settings From the repository, click Repository settings. Click Wiki. Click a check box to set your Wiki privacy settings or choose No wiki. Click Save.

Is GitHub wikis private?

If you create a wiki in a public repository, the wiki is available to the public. If you create a wiki in a private repository, only people with access to the repository can access the wiki. For more information, see "Setting repository visibility."

How do I make a repository public?

Changing a repository's visibility Under your repository name, click Settings. Under "Danger Zone", to the right of to "Change repository visibility", click Change visibility. Select a visibility.


2 Answers

Best thing I found was that Github pages now gives you an option to publish from a "docs" folder:

Github pages options

You could copy the wiki files there, or get fancy, and setup a submodule in that directory that would pull from the wiki repo associated with the primary repo. But don't forget that anything in this folder will now be public, which is good if you want to expose the wiki, but bad if anyone decides to put some other kinds of "docs" in there-

like image 71
chrismarx Avatar answered Oct 09 '22 01:10

chrismarx


Fork the repository, delete all contents by creating a new orphan master branch, force-pushing master and pruning all other branches, make the fork public.

Alternatively, create a new empty repository, create a dummy wiki page on that new repostitory, check out the wiki of the old repository and push it to the new:

git clone [email protected]:user/old-repo.wiki.git
cd old-repo
git remote add new [email protected]:user/new-repo.wiki.git
git push -f master new

Both these solutions result in two repositories: The old, private one that contains the data, and the new public one with the wiki. You can then delete the old wiki.

like image 32
Sven Marnach Avatar answered Oct 09 '22 00:10

Sven Marnach