Have 2 private GitHub repositories for the price of one. For example: Documentation + Coding

posted in: Git | 3


I have a quick tip to give you guys today on how to improve your usage of GitHub.

I know many of you use GitHub for your private and public projects. When you create a new GitHub project, you get the Git repository and the URL to fetch it. It’s shown this way:

Then, you normally do git clone git@github.com:mgonto/factory_pal.git

Screen Shot 2013-02-07 at 12.24.24 AM


As you might know, Github also provides us with a Wiki, where we can put text and everything we want.

Actually, the wiki is another Git repository that we can access. We just have to add a “.wiki” before the “.git” part of the url. So for the git@github.com:mgonto/factory_pal.git, the wiki repository is git@github.com:mgonto/factory_pal.wiki.git.


Screen Shot 2013-02-07 at 12.29.36 AM

You can clone that directory and have a secondary Git repository for anything you want.

So, what are possible usages of this?

I usually have some documentation for the project. This documentation can be Mockups, client meetings, UMLs diagrams and so on. I used to have in my Github repository a code and docs folder. Now, I store the code in the regular repository where I can have pull requests, and the documentation in the wiki repository, together with the wiki pages. This makes it easier to separate our concerns in my opinion.

Another usage would be to have an extra Git private repository :)


  • http://twitter.com/juanedi Juan Edi

    nice! still, IMHO, using the same repo improves tracebility between the documentation and source code at the momento of writing. (e.g., the documentation for a specific code release will be frozen in the corresponding git tag)

    • mgonto

      But, for example if you have Continious deployment with new Heroku staging created for each Pull Request, pushing the documentation on each of those is a real pain in the ass. This way, your code repository would be just code, no heavy PSD is gonna be there.

      Anyway, I do agree that maybe knowing then the documentation was added could be cool, but you could do a git log with filters on both sides, though I agree it’s a little overkill :)

  • finestglasses j.

    Find cool kids glasses discounted costs. Save 70% about RX eyeglasses and structures for children together with following day S&H.