if I have a commit ID in git, does anyone know if there's a single git command that will tell me which tag(s)/branch(es)/remote-tracking branch(es) that commit corresponds to?

it's not:
- git describe
- git branch --contains

the only thing I can find is `git show --no-patch --format='%d' COMMIT_ID` but that's kind of a mouthful, and also it's formatted in kind of a weird way

Follow

@b0rk

What do you mean by "corresponds to"? That it's the tip of that branch/tag/..., or that it's somewhere in that branch's/tag's/... parent closure?

@b0rk Does `git log -1 --oneline $COMMIT` do something that's close enough?

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.