Migrate pages from Wiki extension to a team project wiki
VSTS | 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.
Feature availability: Use this topic to migrate pages made using the Wiki Marketplace extension to the VSTS Wiki. The Wiki* hub is in Preview and available for VSTS and TFS 2018 and later versions. You enable this feature for a team project from the Preview features option from your profile menu. 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 these steps:
- Clone vsts-wikiTools repository and compile the MigrateToVSTSWiki tool
- Create and then clone your VSTS wiki
- Move and commit all markdown pages to your VSTS wiki
- Run the wiki migration tool, MigrateToVSTSWiki.exe
- Once you are done, push the changes to the default master branch, wikiMaster, of the VSTS wiki repository.
To perform these changes, you must be a member of the Contributors group of your team project.
Here are the detailed steps for Wiki migration:
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 VSTS 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 = VSTS 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 VSTS 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 VSTS Wiki.
Once you have migrated your Wiki extension files to the VSTS 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