Lesstep
Azure DevOps Services and Server · REST API, web portal, pipelines and review tools · Tested October 30, 2026

Azure DevOps: "TF401175: The version descriptor <Branch: … > could not be resolved to a version in the repository …"

TF401175 means the repository has no branch (or tag) with exactly the name between <Branch: and >. The server prints the name as it received it, then one space, then >, so read it character by character: a refs/heads/ in front, a different case, a trailing space or a %23 where a # was meant all show there. The end of the message names the repository it looked in.

The whole answer

Tested on October 30, 2026 on dev.azure.com, against a public repository with no sign-in, by reading a file from a branch that is not there:

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repository}/items
    ?path=/README.md&versionDescriptor.version=no-such-branch&versionDescriptor.versionType=branch&api-version=7.1

HTTP/1.1 404 Not Found

{"$id": "1", "innerException": null,
 "message": "TF401175:The version descriptor <Branch: no-such-branch > could not be resolved to a version in the repository dotnet-public-wiki",
 "typeName": "Microsoft.TeamFoundation.Git.Server.GitUnresolvableToCommitException, Microsoft.TeamFoundation.Git.Server",
 "typeKey": "GitUnresolvableToCommitException", "errorCode": 0, "eventId": 3000}

What got it in the same test

Two answers that are not TF401175:

Where it comes from, in public reports

  1. A source branch deleted when the pull request was completed. The pull request still names it in sourceRefName, so whatever reads it by name afterwards gets TF401175: a dependency-update service cleaning up after a merge (2024), a scanner commenting on a pull request (2024), and an IDE plugin whose pull request list failed on diffs/commits?baseVersion=<source branch> (2024, fixed in its next version). Read a pull request's files by commit instead: the pull request keeps the IDs in lastMergeSourceCommit and lastMergeTargetCommit.
  2. The pipeline's branch variable passed as it is. Build.SourceBranch is refs/heads/main, and in a pull request build refs/pull/1/merge: neither is a branch name. Build.SourceBranchName is not the fix, because it is only the last part: refs/heads/feature/tools gives tools (Microsoft's predefined variables). Cut the prefix instead:
    b="${BUILD_SOURCEBRANCH#refs/heads/}"
    In a pull request build, the branch under review is System.PullRequest.SourceBranch, set only when a branch policy ran the build. In 2021 a pipeline task that creates pull requests turned refs/pull/12/merge into baseVersion=2/merge; it now strips refs/heads/ and refs/pull/ first.
  3. Another repository. In 2021 the same task, set to open the pull request in a second repository, asked that repository for the branch the pipeline had built, which only the first repository had. The repository at the end of the message is the one that was asked.
  4. A name the link changed. In 2019 an editor's "open on remote" link turned a branch named #123.fix-all-the-things into %2523123…: encoded twice, so the server looked for a name starting with %23. A name with # has to be encoded exactly once.
  5. A default branch that is not main. In 2022 a migration tool asked for main in a repository that had no such branch. defaultBranch in GET …/repositories/{repository} says which branch it is.

What to check

  1. Copy the name from the raw response and compare it with the branches: GET …/refs?filter=heads/<start of the name> lists those whose names start with it, as refs/heads/….
  2. Is it the right repository? The message names the one it looked in.
  3. Was the branch deleted? In the web portal, on Branches, search for the exact name and select Search for exact match in deleted branches: it shows who deleted it and when, and Restore branch brings it back. Deleted branches are kept with no time limit (Microsoft's Restore a deleted Git branch).
  4. If the name is right, check the type: a branch asked for as a tag was not found, and the other way round is the same.

Azure DevOps pull requests in IntelliJ IDEA and Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It reads a pull request's files by commit ID, from the pull request's last merge source and target commits, so a deleted source branch does not stop its diffs. It uses branch names only when you create a pull request, and then names the source or target branch that the server does not have. The review inbox and diffs are free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps is a trademark of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: TF401174: the file is not there in that version · TF401398: the source or the target branch is missing · TF401019: the repository does not exist or you have no permission · 日本語