179

How do I clone my GitHub repository's wiki? I know it's saved as a separate Git repository, but I can't remember the path.

I've tried ...reponame/wiki.git and ...reponame.git/wiki, but neither are correct.

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
joseph.hainline
  • 23,331
  • 16
  • 51
  • 70
  • 1
    That question was actually several questions, one of which got it closed for being off topic. Also, at the time the accepted answer on that question didn't exist. If anything that answer should be marked as a duplicate of this one. – joseph.hainline Mar 16 '15 at 20:22
  • 1
    I guess you are right. Thanks for pointing that out! – Kromster Mar 17 '15 at 05:09

4 Answers4

292

Append .wiki.git to the repository name.

That is, if your repository name was foobar:

git clone git@github.com:myusername/foobar.git would be the path to clone your repository

and

git clone git@github.com:myusername/foobar.wiki.git would be the path to clone its wiki.

Note: You must have at least one page to be able to clone the wiki repo. (via @tobiasz-cudnik)

joseph.hainline
  • 23,331
  • 16
  • 51
  • 70
  • 2
    Do other users automatically have permission to *push* if they can edit? – krlmlr Nov 07 '13 at 08:38
  • 1
    Yes. You can set them to have read access based on whether they're a collaborator, but push permissions require them to be a collaborator. https://github.com/blog/774-git-powered-wikis-improved – joseph.hainline Nov 12 '13 at 20:27
  • 1
    Works with https urls too: git clone https://github.com/fpinscala/fpinscala.wiki – bluehallu Nov 19 '15 at 14:42
  • 4
    The obvious followup question is: `Can you clone the github Wiki into the same directory as your repo?` Again followed by: *Can I then do a normal `git push` to that repo?* – not2qubit May 19 '17 at 07:34
  • 3
    Important note - you have to have at least one page to be able to clone the wiki repo. – Tobias Cudnik May 22 '18 at 23:07
  • What do we do if the repo owner is not a person but a group of people? – posfan12 Jun 22 '20 at 08:07
6

You can clone the git wiki using following command.

git clone https://github.com/<git-username>/<repo-name>.wiki.git
Venus713
  • 1,002
  • 10
  • 14
  • The full path worked well in VS [Git Changes](https://developercommunity.visualstudio.com/t/VS-Community:-Clone-Project-Wiki/1510875#T-N1537827). Thanks. :) – Laurie Stearn Sep 23 '21 at 15:58
4

The syntax for cloning Github wiki repository is:

git clone [RepositoryName].wiki.git

If it's a private repository, then you'll prompted to enter your username/password.

Qix - MONICA WAS MISTREATED
  • 13,194
  • 13
  • 82
  • 139
Neeraj Bansal
  • 2,132
  • 13
  • 8
1

The Wiki pages are managed as a repository. So click on your repository, then on the left side click on Wiki. Finally on the upper right corner click on Clone Repository. There you will clear instructions on how to clone it correctly.

Begueradj
  • 507
  • 6
  • 18