Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Juwon1405/997d56567d2be2a0c092e6fd2ddc04e1 to your computer and use it in GitHub Desktop.
Save Juwon1405/997d56567d2be2a0c092e6fd2ddc04e1 to your computer and use it in GitHub Desktop.
[Tips-and-Tricks] how-to-copy-github-wiki.md

author: Juwon1405

How to import a github wiki

Unfortunately, GitHub does not directly support the ability to fork a wiki page like you would a repository. However, you can clone the wiki as it is its own separate git repository.

Here's how you can do it:

  1. First, clone the original wiki repository you want to copy. For instance, if the repository is named original_repo and the user's name is original_user, you would do this:

    git clone https://github.com/original_user/original_repo.wiki.git
  2. Now create your own repository where you want to push the wiki. You can create a new repository on GitHub or use an existing one.

  3. Navigate to the cloned wiki directory and add a new remote for your repository. In this example, your username is your_username and your repository is your_repo:

    cd original_repo.wiki
    git remote add new_wiki https://github.com/your_username/your_repo.wiki.git
  4. Then push the cloned wiki content to your new wiki repository:

    git push -u new_wiki master

Now, the content of the original wiki has been copied to your new wiki repository. Note that while this method allows you to get the content of the original wiki, your new wiki won't automatically update if the original wiki gets updated. If you want to keep it up-to-date, you'll have to repeat this process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment