Find branches containing a commit

Isabelle Viktoria Maciohsek · Git, Branch, Commit · Apr 13, 2021

Prints all the branches containing a specific commit.

  • Use git branch --contains <commit> to see a list of all branches containing <commit>.
git branch --contains <commit>
git branch --contains 3050fc0d3
# patch-1
# patch-2

Would you like to help us improve 30 seconds of code?Take a quick survey

Recommended snippets