Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
This article describes how to view the revision history of a wiki page in Azure DevOps. It also provides information on how to revert changes made to a wiki page.
Prerequisites
Category | Requirements |
---|---|
Project access | Member of the project where the wiki is located. If you don't have access, request it from your project administrator. Anyone with access to the team project can view the wiki, including Stakeholders. |
Permissions | - To add or edit wiki pages: Member of the Contributors group. - To publish code as wiki: Create Repository permission. By default, this permission is set for members of the Project Administrators group. |
Access levels | At least Basic access. |
View wiki page revision history
You can view the page history for a file in a provisioned wiki by following these steps:
Sign in to your project (
https://dev.azure.com/<Organization>/<Project>
) in Azure DevOps.In the left navigation, select Wiki, and open the wiki page you want to view.
In the wiki page view on the right, select
More options > View revisions:
The Revisions page shows who made changes to the page, along with the revision messages, the date for each change, and the version or commit ID.
To review the changes made in a specific revision, select the message or version link to open the file.
The wiki file opens in the Compare view that shows the file changes for that commit or version.
The review experience for revisions in Azure DevOps is similar to working with the Files changed view in GitHub. You can select Show diff side-by-side to compare the two versions of the file or Show diff inline to see the changes in a single pane:
To review the prepublished Markdown (.md) content, select Preview.
To return to the initial view of the page or go back to the list of page revisions, use the breadcrumb navigation.
Note
The revision viewing experience is the same for a page in a published as code wiki but the Revert action isn't available.
Revert a commit for a provisioned wiki
You can revert a change on a wiki page by following these steps:
Go to the Revisions page for the wiki file and open the specific revision that you want to apply to the page.
When the wiki file opens, select Revert:
In the confirmation dialog, select Revert:
Revert a commit for a published as code wiki
To revert to an earlier revision for a page that you published as code, you have two options:
- If the commit to apply is the most recent revision for the page, you can revert from the web portal.
- If the commit is an earlier revision and there are more recent commits for the page, create a separate branch and do the revert in the branch.
Revert the page content in the web portal
To revert a wiki page from the most recent revision in the Azure DevOps web portal, follow these steps:
Go to the Revisions page for the wiki file and locate the most recent revision.
Copy the full ID for the revision commit by selecting
Copy full SHA to clipboard:
Go to Repos > Commits, paste the copied commit ID into the Commit ID box, and select
Search:
On the Commit page, select
More options > Revert:
In the Revert commit pane, select the Target branch for the commit, enter or select the Target branch name, and then select Revert:
The specified target branch is created with the reverted changes.
If you receive an error message, you might need to create a local branch and make your changes manually as described in the next section.
Select Create Pull Request.
In the New Pull Request dialog, select Create.
In the Complete pull request dialog, select the Merge type. Optionally, select the checkboxes for options to complete after the merge.
Select Complete merge to merge the changes into the main wiki branch:
To view the reverted content, go to the wiki page and refresh the browser.
Revert from earlier revisions with a different branch
You can also revert to older committed version of a page in a published as code wiki by using a branch other than the main branch for the wiki. After the update to the other branch, you create a pull request to the main branch.
Create a local branch of the main wiki branch.
View the commit history and locate the commit with the changes to revert.
Use the Revert command described earlier to revert the desired commit.
When a conflict arises, use the conflict resolution tool to resolve the issues.
Commit the changes to your local branch.
Push the local branch to the remote server.
Create a pull request for your local branch into the main branch for the wiki.
Complete the pull request.