Recover "accidentally" deleted branch
Or how reflog save me
To recover any removed branch, you can do:
git reflog
This will bring the sha1 for your commits. select the one where your killed branch was left on. Then:
git branch <sha1>
That will resurrect your dead branch, and save you from redoing everything again.
Written by Javier Guerra
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#