View all branches that have a certain commit

1 min read

  • technical
  • git

Published on November 14, 2024

git branch -a --contains commit_hash

This will list all the branches that have the given commit_hash. In the current team that I'm working on, this is particularly useful to figure out which release a particular commit was part of.