Loading episodes…
0:00 0:00

Recover a Deleted Git Branch with Reflog

00:00
BACK TO HOME

Recover a Deleted Git Branch with Reflog

10xTeam September 05, 2020 1 min read

In this quick tip, we’ll see how to recover a removed Git branch using Reflog

First, run the following command to display the SHA1 of your commits:

$ git reflog

Look for the SHA1 code of your deleted branch and then run the following command:

$ git branch <sha1>

This will recover your deleted branch.


Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Audio Interrupted

We lost the audio stream. Retry with shorter sentences?