If I run git branch -d XYZ, is there a way to recover the branch? Is there a way to go back as if I didn\'t run the delete branch command?
git branch -d XYZ
For recovering a deleted branch, First go through the reflog history,
git reflog -n 60
Where n refers to the last n commits. Then find the proper head and create a branch with that head.
git branch testbranch HEAD@{30}