joseph.hainline
joseph.hainline

Reputation: 26618

How do I clone a GitHub wiki?

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.

Upvotes: 209

Views: 81133

Answers (6)

Martijn Dirkse
Martijn Dirkse

Reputation: 677

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).

Upvotes: 3

Serge
Serge

Reputation: 3765

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

Upvotes: 1

Venus713
Venus713

Reputation: 1591

You can clone the git wiki using following command.

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

Upvotes: 15

joseph.hainline
joseph.hainline

Reputation: 26618

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)

Upvotes: 338

Neeraj Bansal
Neeraj Bansal

Reputation: 2826

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.

Upvotes: 5

Andath
Andath

Reputation: 22724

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.

Upvotes: 1

Related Questions