Background: I use an automated build system which takes a git hash as input, as well as the name of the branch on which that hash exists, and builds it. However, the build syst
You can ask git branch directly which branches contain the commit in question:
git branch
% git branch -a --contains 4f08c85ad * master remotes/origin/bug_872 remotes/origin/bug_898 remotes/origin/master