I assume that a git commit hash (5743a31610d38064af35573b91e3bbe39d808b9b) will always map to 0 or 1 git branches? Is there a reliable way to trace what the branch name was when the git commit was created? From what I know a git branch is a pointer to a commit, given a commit can we reliably point to a branch (if the branch still exists)?
Context: I am creating some devops deployment change-logs so we can keep track of what we changed - I am wondering if it's worthwhile to name the git branches that were released, or just put the git commit hash in there, and we can reverse lookup the branch name if we really want to?