Use a single repository for multiple wikis in Azure DevOps
Published: 2024-03-09 16:19:38

---
title: Use a single repository for multiple wikis in Azure DevOps
published: true
date: 2023-12-07 00:00:00 UTC
tags: 
canonical_url: https://www.visualstudiogeeks.com/azure%20devops/using-single-azdo-repo-for-multiple-wikis
---

This is a quick post to share how you can use a single Azure DevOps repository for multiple wikis in Azure DevOps. This approach will help you avoid creating multiple repositories for each wiki and manage them in a single repository.

<!-- more -->
## Create a new repo for wiki

Firs lets create a separate repository for the wiki.

![Create Repository](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/create-repo.png)
_Create a repository_

I want to create two wiki for two teams in my project. So I have created subfolders for each team in the repository and have placed sample markdown files in each folder. The idea is that each team will place their wiki content in their respective folder.

![Folder Structure](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/repo-folder-structure.png)
_Folder structure_

## Publish code as a new wiki

Now let us create a new wiki in Azure DevOps. Go to the project settings and click on the Wiki tab. We will publish a new code wiki.

![Publish code as wiki](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/publish-code-as-wiki.png)
_Publish code as wiki_

Do the same for the second wiki.

![Publish code as wiki](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/publish-code-as-wiki-2.png)
_Publish code as wiki_

This will create two wikis in the project.

![show-wikis](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/show-wikis.png)

## Configure the wiki

As you can see that was easy. However, at it stands now, both the wikis are open for edits from all the team members. We need to restrict the access to the wiki content based on the team. We will make use of branch policies to achieve this.

![Set the branch policy](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/branch-policy.png)
_Set the branch policy_

Now, when any time changes are made to the wiki under `01-team-infra/*` folder and a PR is created, Infra team will automatically be included as reviewers. Similarly, for the `02-team-app/*` folder, App team will be included as reviewers.

![pull-request](https://www.visualstudiogeeks.com/images/screenshots/utkarsh/2023-12-07-using-single-azdo-repo-for-multiple-wikis/pull-request.png)
_Pull request showing automatic reviewers added_

That is it for this post. You can now use a single Azure DevOps repository for multiple wikis in Azure DevOps. As mentioned above, this approach will help you avoid creating multiple repositories for each wiki and manage them in a single repository.

Hope you enjoyed reading this.