Reputation: 1
I'm trying to restore deleted branches in Azure DevOps, but I don't know the exact branch names. I only know that the branch names end with "2.0". How can I restore these branches
Upvotes: 0
Views: 51
Reputation: 13944
When trying to restore a deleted branch from the web page of Azure DevOps, you must search with the exact branch name. It is not available for searching with wildcards or part of the branch name.
For more details, see the documentation "Restore a deleted Git branch from the web portal".
So, you first need to get the exact name of the branch you want to restore.
Upvotes: 0
Reputation: 1777
the branches in azure devops is just in a git repo. you can clone the repo to local, then try to find the sha1 for the commit at the tip of your deleted branch. then you can checkout the deleted branch by sha1, push the branch again from local to remote. more details here for how to recover a branch after deletion.
Can I recover a branch after its deletion in Git?
Upvotes: 0