Hacker News new | past | comments | ask | show | jobs | submit login

> Otherwise, you can still clone the repository and make use of: git reflog or git fsck to find your last commit and change the HEAD.

I don't understand: when I clone a repo, I get a copy of all the branches/tags and the commits they point to & the trees/blobs from those commits. If the repo is wiped, I get a single master branch with a single commit with a single tree and a single blob, and no reflog because that is local to the repo, and I (as a fresh cloner) haven't updated any refs.

Perhaps they are thinking about a mirror clone? That still won't include the reflog, but you can at least find dangling commits and guess which one was master.

Oops, mirror clone only includes reachable commits. No idea what the 'Otherwise' clarification means then, it sounds bogus

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact