We are using Git & Gerrit, Couple of months back our Ex. Colleague (He was an Gerrit Admin) who had deleted a remote gerrit project branch. Now I have request to restore the deleted remote branch. Locally no one has the copy of that branch. As an Gerrit admin So far I have tired the below ways to restore it, However didn’t worked. Is there any way to restore the same?
1. Cloned the project/repository locally.
2. git reflog --all
3. git reflog --no-abbrev
git fsck --full --no-reflogs --unreachable --lost-found | grep commit | cut -d\ -f3 | xargs -n 1 git log -n 1000 --pretty=oneline > .git/lost-found.txt
Through Gerrit Web itself able to restore the branch. (Gerrit Web--> Project--> Branch--> Enter the branch name and input the commit-id/Initial Revision --> Create Branch.