Search code examples
gitgithubgithub-desktop

Is it possible to view all the deleted branches in github (even if they are not included in PR)


I accidentally deleted some of the origin branches using github desktop, but not sure what are the deleted branches to restore. Is there a way to find the deleted branches, either through github desktop or through github website?


Solution

  • There are 2 possibilities that may work for you:

    1. Since you happen to be using GitHub Desktop, you could check the logs.

    2. If you can access another copy of the repo somewhere that still has those branches and hasn't fetched yet since you deleted them (perhaps a co-worker or another machine), you could look at that repo to see which branches it still has that you don't. And, if they have pruning on, if they fetch from the command line you'll see a list of branches that you deleted in their output.