7

I want to give read and write access to the wiki for a private repo on github, on the same repo, I don't want these team members to be able to see the actual repo (the repo that contains the code not the wiki itself), is there a way to do that?

To make it more clear, I want to publish my API's documentation, which is just internal to the team, that uses the API but keep the actual api code hidden from them (it sounds evil, but it is not that bad, you need to know the whole story, please don't judge me).

Ali
  • 18,665
  • 21
  • 103
  • 138

1 Answers1

3

One workaround would be to use the wiki of a public repo, and declare that public repo as a submodule of the private repo.

That fact that the wiki repo is a submodule means the parent repo (the private one with the code) does record the exact version (SHA1) of the wiki repo it is in sync with: each version of the private repo knows what version of the wiki it refers too.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks, so to make it more clear for myself, I need to create another repo (that can just be a public one, or a private one if I need to) and in the base repo (the one that has the actual code) I need to add this as a submodule (and this is to keep the versions of the main repo in sync with versions of wiki, or at least I can associate a version on main repo with a version of wiki). Correct? – Ali Oct 26 '12 at 09:46
  • 1
    @Ali: Correct, but let me just precise which is submodule of which: you would declare the wiki repo as a submodule within the code private repo. Then you can modify the wiki repo directly from the parent repo (see http://stackoverflow.com/questions/1979167/git-submodule-update/1979194#1979194). For more, see also http://stackoverflow.com/questions/12078365/how-exactly-does-git-submodule-work/12078816#12078816 – VonC Oct 26 '12 at 09:49