Skip to content

Instantly share code, notes, and snippets.

View JaimeStill's full-sized avatar
👽

Jaime Still JaimeStill

👽
  • Arma Global / General Dynamics
  • Fayetteville, NC
View GitHub Profile
@JaimeStill
JaimeStill / recover-deleted-branch.sh
Created September 25, 2022 15:08 — forked from umayr/recover-deleted-branch.sh
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}