I deleted a branch and I was presuming that a certain commit (let's call it C
) was no longer reachable. I was able to find the commit in question using git reflog
. However, I am puzzled by the fact that that commit doesn't show up when I do:
git fsck --unreachable --no-reflogs
I was expecting that C
was unrechable, and yet it doesn't show up in the output of the above command.
So, the question is:
Given a commit C
, is there a way to understand how C is reached?
git describe
does the opposite, in a sense, of what I am trying to achieve. When I do git describe C
I get the tag that is reachable from C
whereas I want to opposite. I want to understand which tag / branch can be used to reach C
, and thus understand why git fsck
does not report it as unreachable.