I was wondering if there is a way to restore a remote deleted branch in github. History clearly keeps record of the branch and merges with other branches but I\'m not sure i
git reflog
will show you the history of HEAD
. If the branch you deleted was named foo
, then in that output, you should see lines like 48534f5 HEAD@{0}: checkout: moving from master to foo
or 48534f5 HEAD@{1}: merge foo: Fast-forward
. You can search the output of git reflog
to figure out which commit must be the latest one that foo pointed to.
Do realize, that the "foo" reflog file itself is deleted when foo was deleted, but since the HEAD's reflog is different it still exists.