Entries are not in branches, but in branches - these are just repo-local labels hanging on a particular commit. For example, most projects have only one root, and each individual branch returns to this. Git does not care that if any branch is your “main” branch, it is entirely a matter of interpretation.
You can
git branch --contains $thatcommit
to see all the branches that can track the pedigree for this commit, and
git log --branches --decorate --simplify-by-decoration --oneline \ --ancestry-path --first-parent ^$thatcommit
to see all branches that trace the pedigree with this message through their primary links (i.e. not branches that include this, just a merge).
edit: it’s really easy to say “branches”, but it’s very difficult for beginners to remember that every name you use in Git is tracked in a very short order for an otherwise-undifferentiated object in the db object - refname is just a convenient finger in the repo. More pedantically correct would be a “branch branch” or even “fixing the tip of a branch”.
The only thing related to the ref fiction is the full spelling of "refs / heads / $ branchname", and when git checkout sees that it makes HEAD symbolic link to this - so everyone who updates HEAD instead updates the branch hint, and each who looks at HEAD sees the current tip of the branch.
You can put repo-local notes on refs links; for a few convenient commands, see the branch.$branchname config branch.$branchname for your default values.
source share