Skip to content

Maintaining the wiki locally

Erick Samera edited this page Mar 10, 2023 · 1 revision

This document is intended to provide a protocol for cloning the wiki and local maintenance

Table of Contents

Requirements

  • git>=2.25.1

Recommended

  • GitHub Desktop

Background

For proper version control and ease of maintenance, the wikis on GitHub can be cloned locally. However, this process is slightly more involved than using GitHub Desktop to clone a repo.

Protocol

Cloning the wiki with git

  1. Navigate to the wiki that you would like to clone. Any page within the same wiki is equivalent.

  2. Just under the sidebar, there should be a small address to copy which allows you to Clone this wiki locally. You can either click on the clipboard or manually copy the entire address.

  3. Navigate to the directory where you would like to clone the wiki and create a terminal instance at that location.

  4. Use the following command to create clone the wiki 'repository'

    $ git clone https://github.com/KPU-AGC/general-resources.wiki.git

    This should automatically pull from ORIGIN and automatically retrieve the latest version of the wiki.

Loading the repo into GitHub Desktop

At this point, the wiki is locally instantiated, but it is also possible at this point for GitHub Desktop to recognize the wiki as a repository for automatic fetching, pulling, and pushing.

  1. Open GitHub Desktop.

  2. Either use CTRL+O or go to the top-left dropdown and select Add > Add existing repository... and navigate to the directory where the wiki was cloned into.

    Note: there should be a .git directory in the root directory.

  3. Done! The directory will be recognized like a repo and will automatically fetch origin or track changes.