Interview Prep/Git & GitHub/GitHub features, history rewriting and scale

How do you see the history of a deleted branch or find a commit that is no longer on any branch?

BeginnerConceptGitHub features, history rewriting and scale
Answer

Use git reflog for local activity, or git fsck --lost-found for dangling commits. On GitHub, a deleted PR branch can be restored from the closed PR page, and refs/pull/N/head keeps the commits reachable.

All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub features, history rewriting and scale