in git, what ways are there to "lose" a commit in a way that you CAN'T recover using the reflog (so that you need to iterate over every single commit in the repository if you want to find it?

The only ways I know are:

* using `git stash drop` or `git stash pop` to drop a stashed commit
* waiting 90+ days to try to recover the commit (so that it expires from the reflog)

Follow

@b0rk

Explicitly deleting the reflog entry/pruning the reflog (git reflog has subcommands for both, git gc can be explicitly given the age threshold).

I'm not sure what happens with the per-branch reflogs when you delete the branch and per-worktree reflogs when you delete the worktree.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.