1

I have a commit bca7704e that I'm pretty certain is not in Release-1.0. If I do git log Release-1.0 and search, the commit doesn't show up. However, if I do git log bca7704e it seems to do the log for that commit without respect to the current branch (which I would expect anyway)

I can do git branch --contains bca7704e | grep Release-1.0 as an ad-hoc check to see that the commit is not in the current branch.

However, is there any way to look for commits with respect to a given branch (or the current branch?) If the commit doesn't exist I would expect it to error out.

Explosion Pills
  • 188,624
  • 52
  • 326
  • 405
  • 2
    Possible duplicate of [How can I tell if one commit is an ancestor of another commit (or vice-versa)?](http://stackoverflow.com/questions/18345157/how-can-i-tell-if-one-commit-is-an-ancestor-of-another-commit-or-vice-versa) – Oliver Charlesworth Aug 23 '16 at 16:19
  • You can just `git log | grep bca7704e` – Martin G Aug 23 '16 at 17:55

0 Answers0