tags:

views:

30

answers:

2

Can I compare a commit to a branch and see if there is a diff, or just get a yes / no answer to the question somehow?

A: 

Ah:

git log <commit hash>
Erik Vold
+1  A: 

If a commit is on a branch's history then this list of commits will be empty, otherwise there will be at least one commit (the given commit).

git rev-list <branch_id>..<commit_id>
Charles Bailey
this is much better, thanks!
Erik Vold