Clone and update wiki content offline

TFS 2018

You can update your wiki pages offline the same way you develop code in a Git repo.

Note

GIT workflows, like branch policies, are applicable only for publish code as wiki workflows.

You can use any client you want or git command-line tools to update your wiki offline. For details on working with Git repositories and supported tools, see Git Repositories.

The basic steps to update wiki content offline are as follows:

  1. Clone your wiki Git repo to your local IDE or workspace.
  2. Add files or folders to your local git branch.
  3. Update the .order files to reflect your pages and subpages.
  4. Commit and push the updates you made to your local git branch.

Prerequisites

Do the following steps to migrate Markdown pages from another wiki to your team project wiki.

Clone your wiki

Your wiki repository stores pages, images, attachments, and the sequence of pages and subpages. Clone your wiki to begin.

  1. Sign in to your project (https://dev.azure.com/{Your_Organization/Your_Project}) and then select your wiki.

  2. Open the More actions context menu and select Clone wiki.

    Clone wiki Git repository

  3. From the Clone repo dialog, select Copy clone URL to clipboard.

    Copy the wiki url

    Enter it in your browser to view the files defined under the wikiMaster branch.

    Wiki main files

  4. Use the URL that you copied to clone the repo in the IDE that you use. To learn more, see one of the following articles:

Add pages to your local Git repository

We author pages using Markdown format. Add a Markdown file to your local branch for each page and subpage that you want to add to your wiki.

Add pages

To add pages at the root of the wiki tree, add a Markdown file at the root of the Git repository.

  1. For each page you want to add, create a Markdown file with the page contents, and then add it under the root folder for your repo.

    For the CanaryBuilds team project, it's in the following folder:

    C:\Users\UserName\Source\Repos\CanaryBuilds.wiki

  2. To add pages at the root of the wiki tree, add a Markdown file for each page at the root of the Git repository.

    Local branch wiki Git repo

  3. After you added all the pages you want to add at the root, update the .order file at the root. It should have one entry for each Markdown file that is defined at the root. Each entry should match the file title with spaces replaced with a dash.

    For example:

     Welcome
     Roadmap  
     How-to-contribute  
     Home  
     Reference  
    

Add subpages

  1. Create a folder for the parent page, and then add Markdown files for each subpage in the folder.

    For example, we added the following files to the How-to-contribute folder. These subpages appear under the How to contribute page in the wiki.

    Screenshot of the subpages.

  2. Add a .order file in the folder with the order of the subpages as they should appear in the wiki. To understand the use of the .order file to sequence pages, see Wiki Git repository files and file structure.

    For example, the file has the following subpages:

     Request-extensions  
     Licensing  
     Smoke-test  
     Coding-guidelines  
    

Push your changes

When you're done with all your updates, push the files to the Git repository.

The added pages and subpages appear immediately in your wiki.

Wiki tree updated

If there are any errors in the process, the pages appear in your wiki with a warning sign.

Warning when .order file isn't updated properly.