Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover a deleted branch in Azure DevOps git without knowing the "exact" name

I think I deleted a branch (locally and remote) few days ago in Azure DevOps (git repo). I know it is possible to restore if I knew the "exact name", but what if I didn't remember it entirely? Is there any activity logs I can refer to get the full name? Any Idea?

https://learn.microsoft.com/en-us/azure/devops/repos/git/restore-deleted-branch?view=vsts&tabs=new-nav

like image 362
Steeve Avatar asked Oct 17 '22 10:10

Steeve


1 Answers

Look for the id of the revision of the tip of the branch you want to recover on git reflog. Then you can use that id (checkout, create a branch on it, whatever).

like image 141
eftshift0 Avatar answered Nov 01 '22 13:11

eftshift0