sunmingtao / sample-code

3 stars 4 forks source link

How to restore a deleted branch? #238

Closed sunmingtao closed 3 years ago

sunmingtao commented 3 years ago

Find the 'sha' for the commit at the tip of your deleted branch using:

git reflog

To restore the branch, use:

git checkout -b <branch> <sha>

https://confluence.atlassian.com/bbkb/how-to-restore-a-deleted-branch-765757540.html