117 words
1 minute
Migrating a GitHub wiki from one repository to another
Migrating a GitHub wiki from one repository to another
I figured out how to migrate a GitHub wiki (public or private) from one repository to another while preserving all history.
The trick is that GitHub wikis are just Git repositories. Which means you can clone them, edit them and push them.
This means you can migrate them between their parent repos like so. myorg/old-repo is the repo you are moving from, and myorg/new-repo is the destination.
git clone https://github.com/myorg/old-repo.wiki.gitcd old-repo.wikigit remote remove origingit remote add origin https://github.com/myorg/new-repo.wiki.gitgit push --set-upstream origin master --forceThis will entirely over-write the content and history of the wiki attached to the new-repo repository with the content and history from the wiki in old-repo.
Migrating a GitHub wiki from one repository to another
https://mranv.pages.dev/posts/migrating-a-github-wiki-from-one-repository-to-another/