How To Recover Deleted Branch In Azure DevOps

Here is my complete, step-by-step guide on how to recover a deleted branch in Azure DevOps, covering everything from the web portal to command-line saves.

How to recover deleted branch in Azure DevOps

Method 1: The Web Portal (The Easiest Method)

Step 1: Navigate to Your Repository

Log in to your Azure DevOps organization. Navigate to your Project, then hover over Repos in the sidebar and select Branches.

Step 2: Search for the Deleted Branch

By default, the “Mine” and “All” tabs only show active branches. If you scroll through the list, you won’t see your deleted branch.

  1. Locate the “Search all branches” box in the top right corner.
  2. Type the exact name of the deleted branch.
    • Note: Partial matches often fail here. You need the full string, e.g., feature/login-update rather than just login.
  3. Once you hit enter, you will likely see “No branches found.” Look closely for a link that appears below the search bar saying: “Search for exact match in deleted branches.”

Step 3: Restore the Branch

Click that link. Azure DevOps will query the recycle bin for that specific string.

  1. Your branch should appear in the list with a Deleted status.
  2. Hover over the row to find the actions menu (the three vertical dots ...).
  3. Select the Restore branch. Check out the screenshot below for your reference.