Reputation: 16528
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?
Upvotes: 1
Views: 78
Reputation: 791899
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>
Upvotes: 2