git knows a commit what branches Find branches the commit is on git branch -a --contains git reflog show --all | grep a871742 git reflog show is actually just an alias for git log -g --abbrev-commit --pretty=oneline Find a subsequent merge commit git log --merges ..