Suppose you want to restore a branch that’s been deleted after you merged a Pull Request. (TBH: I’m not sure under what conditions you want to restore a branch that’s been merged. If you need to make more changes, my guess would be to create a new branch and a new Pull Request. I’m curious to hear other’s thoughts in the comments.)
But when you go to your list of branches by clicking the Branches link above the repository language bar
You’ll find that your recently deleted branch (e.g. readme-draft) isn’t listed.
Since the readme-draft branch you saw me delete from the previous tips is tied to a Pull Request, you can navigate back to that Pull Request (make sure you search for closed Pull Requests!!)
and now you’ll see the button to restore the deleted branch.
Clicking on Restore branch button takes you right back to where you were at in the Pull Request before you deleted the branch, with the exception of history that you’ve restored the branch.
You’ll also see the branch come back in the Branch:master dropdown switch button.