Check what branch a commit is in

git branch --contains <commit>