开发者

Is there a quick way to see if a commit hash is in a particular tree's history?

开发者 https://www.devze.com 2022-12-26 03:30 出处:网络
Can I compare a commit to a branch and see if ther开发者_StackOverflow社区e is a diff, or just get a yes / no answer to the question somehow?If a commit is on a branch\'s history then this list of com

Can I compare a commit to a branch and see if ther开发者_StackOverflow社区e is a diff, or just get a yes / no answer to the question somehow?


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>


Ah:

git log <commit hash>
0

精彩评论

暂无评论...
验证码 换一张
取 消