202

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.

1
  • 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. Commented Mar 16, 2015 at 20:22

6 Answers 6

328

Append .wiki.git to the repository name.

That is, if your repository name was foobar:

git clone [email protected]:myusername/foobar.git would be the path to clone your repository

and

git clone [email protected]: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)

8
  • 2
    Do other users automatically have permission to push if they can edit?
    – krlmlr
    Commented Nov 7, 2013 at 8: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. github.com/blog/774-git-powered-wikis-improved Commented Nov 12, 2013 at 20:27
  • 1
    Works with https urls too: git clone github.com/fpinscala/fpinscala.wiki
    – bluehallu
    Commented Nov 19, 2015 at 14:42
  • 5
    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
    Commented May 19, 2017 at 7:34
  • 4
    Important note - you have to have at least one page to be able to clone the wiki repo. Commented May 22, 2018 at 23:07
15

You can clone the git wiki using following command.

git clone https://github.com/<git-username>/<repo-name>.wiki.git
1
5

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.

0
2

You can copy the URL to the clipboard, see the below screenshot:

Copy URL of wiki repository

The address bar in your browser shows the URL of the main repository (number 1). The wiki that belongs to the main repository is a separate Git repository. You can see it by clicking the Wiki tab (number 2). Then you have a button to copy the URL of the wiki repository (number 3).

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.

1

You can totally use GitHub website to clone a repo wiki onto your github space.

  1. click + (plus sign) in upper right corner.
  2. click import repository
  3. enter name of old repo with .wiki between .git and repo name, something like [email protected]:projectx/foobar**.wiki**.git
  4. Enter the name of new repo, say fubar_wiki

Not the answer you're looking for? Browse other questions tagged or ask your own question.