Find out if a specific commit exists in git branches

I see a commit in the event log foo. I would like to determine if this commit was selected on a branch bar.

If I were in a pure git environment, I think that the hashes will be the same, but the branch in question was involved using git-svn.

+5
source share
2 answers

Try " git cherry" or " git patch-id".

+5
source

I think there will be an idiomatic answer git branch --contains <commit_id>, and you can use branch -rto check for deleted ones for commit.

+2
source

All Articles