Friday, October 26, 2018

Lesson 4.1: Can I recover a branch after its deletion in Git?

  1. How to recover branch if you deleted it:
         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?


Resolve:
Instruction recover step by step:
  • git reflog
  • git checkout [sha]
  • git checkout -b [branchname]
  •   

No comments:

Post a Comment