Clone and update wiki content offline

Azure DevOps Services | Azure DevOps Server 2019 | 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 the pages and subpages that you've added
  4. Commit and push the updates you made to your local git branch

Prerequisites

Do the following to migrate Markdown pages from another wiki to your team project wiki or to content that you publish as code to a wiki.

Do the following 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 organization (https://dev.azure.com/{yourorganization}), and then select your project.

    Screenshot of sign-in to Azure DevOps, and then select Project

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

    Clone wiki Git repository
  3. From the Clone repo dialog, select the  copy-clone icon.

    Copy the wiki url

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

    Wiki Master 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 Fabrikam Fiber team project, it's in the following folder:

    C:\Users\UserName\Source\Repos\Fabrikam Fiber.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've 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 to following files to the How-to-contribute folder. These subpages appear under the How to contribute page in the wiki.

    Local branch wiki Git repo

  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 is not updated properly