Migrate pages from Wiki extension to a team project wiki
Azure DevOps Services | TFS 2018
With the release of the built-in wiki, any wiki pages that you created using the Wiki Marketplace extension have been saved to a Git repo in your team project. Use this topic to migrate pages made using the Wiki Marketplace extension to your team project Wiki. The Wiki feature is available for TFS 2018 and later versions. To learn more, see Create a wiki for your team project.
You can migrate the markdown pages and other artifacts that were added to that repo to your team project wiki with the following steps:
- Clone vsts-wikiTools repository and compile the MigrateToVSTSWiki tool
- Create and then clone your Azure DevOps wiki
- Move and commit all markdown pages to your Azure DevOps wiki
- Run the wiki migration tool, MigrateToVSTSWiki.exe
- Once you are done, push the changes to the default master branch, wikiMaster, of the Azure DevOps wiki repository.
To perform these changes, you must be a member of the Contributors group of your team project.
The detailed steps for Wiki migration are as follows:
Clone vsts-wikiTools repository and compile the MigrateToVSTSWiki tool
Compile the project under the path Tools/MigrateToVSTSWiki to generate the migration tool EXE.
From a web browser, open your Azure DevOps team project and create your first wiki page.
Get the URL to clone your wiki. See Clone your wiki and edit wiki pages offline.
Let the clone location be identified as "LocationA" for the purposes of these procedures.
Clone your Wiki repo using your IDE or git clone command.
Clone the Wiki extension repo. The Wiki will be mapped to a folder given to you during the wiki creation. You can check that by going to "manage wiki" option in the existing wiki as shown below.
You'll find your existing wiki pages are saved under the folder labeles "Root".
For example, say you have cloned the above mentioned "sampleWiki" in the location "C:\wiki\sampleWiki". The wiki pages are saved in the path "C:\wiki\sampleWiki\ _extensionWiki"
Let this location be identified as "LocationB" for the purposes of these procedures.
Create an empty folder in any path of your choosing in your local machine and let that be "LocationC" for the purposes of these procedures.
- Location A = Azure DevOps Wiki repo
- Location B = Wiki extension repo
- Location C = Empty folder where we will run our migration tool
Open a command prompt as an administrator and run MigrateToVSTSWiki.exe. This tool will copy the files from your existing wiki to the destination directory you provide. During copying, the tool converts the pages to be compliant with the Azure DevOps wiki.
MigrateToVSTSWiki.exe /source:LocationB /destination:LocationC
- "E:\wiki\sampleWiki_extensionWiki" is the folder in which the existing wiki files are present
- "E:\Temp\Wiki\New" is the empty folder into which the migrated files are to be copied.
Next, remove all files from "LocationA" (if any) apart from the git related files such as .gitignore etc.
Copy all files from "LocationC" and paste them into "LocationA".
Run git add . to stage all the newly added files in "LocationA" for the commit.
Run git commit -m
to commit the files that you have staged locally.
Run git push origin wikiMaster -f . to push the changes to the default branch of the Azure DevOps Wiki.
Once you have migrated your Wiki extension files to the Azure DevOps Wiki, you are ready to uninstall the Wiki extension.
- Wiki page title naming conventions
- Clone and update wiki pages offline
- Source code for the wiki tools
- Git quickstart