Skip to content
Alex Hints

How to restore a branch you deleted in GitHub

This guide shows how to find a deleted branch in the pull request that used it, restore it in one action, and confirm the commits are back.

4 steps · About 1 minutes · Last reviewed July 30, 2026

Independent guide

Before you start

  • A GitHub account with write access to the repository
  • A pull request that used the deleted branch

Interactive guide

Guide frame
The interactive guide for this task is not published yet. The steps below cover the whole workflow.

What you will do

This guide shows how to find a deleted branch in the pull request that used it, restore it in one action, and confirm the commits are back. When you finish, the change is saved in GitHub and you can confirm it without leaving the screen you ended on.

Steps at a glance

  1. 01Open the pull request that used the branch
  2. 02Find the branch notice in the timeline
  3. 03Select Restore branch
  4. 04Confirm the commits are present

Notes and limitations

Restoring from a pull request works only while the reference is still in the repository. If the branch was never pushed, recovery has to happen in your local clone instead.

Something changed?

Software changes quickly. Tell us if a step is inaccurate or no longer matches the product.

Report an outdated step

Need a different workflow?

Request a clear guide for another task in GitHub.

Request a guide

Want guides like this for your product?

Alex Hints creates interactive guide libraries for onboarding, support, releases, and training.

Created with FramePin.Explore FramePin

Privacy settings

Optional analytics

Analytics cookies help us count visits and understand which pages and guides are useful. They do not affect access to any feature. The analytics page names the provider we use and what it receives.

The choice is saved in this browser. Turning analytics off stops future collection and removes the analytics cookies this site can access.

Read how analytics works