Moving a GitHub Wiki

GitHub Wikis are not accessible via GitHub API v4. We can use a couple simple Git command line statements to move a GitHub Wiki.

For these examples, we assume that:

  • old wiki: github.invalid/username/repo1.wiki.git
  • new wiki: github.invalid/username/repo2.wiki.git

Copy GitHub Wiki to your laptop:

git clone --bare https://github.invalid/username/repo1.wiki.git

Browse to new Wiki and create blank Wiki

Mirror push Wiki to new repo:

git -C repo1 push --mirror https://github.invalid/username/repo2.wiki.git

Once you see the new Wiki is OK, remove the old Wiki pages if desired:

git -C repo1 rm *.md

git -C repo1 commit -am "deleted old wiki pages"

git -C repo1 push

Duplicating GitHub Wiki