DEV Community

Cover image for How to undo your deleted local branch
mzulfanw
mzulfanw

Posted on

How to undo your deleted local branch

Heloo, back again with me. In this tutorial i will share about " How to undo your deleted local branch ".

Story

maybe accidentally deleted the development or master branch in your local computer branch.

Step 1

  • type in your cmd or git bash git reflog or you can see the sha after your deleted ex: 112323

Image description

  • After that, you can type git branch branchname sha

Image description

  • And tadaaa , your local branch has been restored 🎉

thanks for reading this article, you can connect with me in

LinkedIn
Github

Top comments (0)