【发布时间】:2020-10-13 12:13:24
【问题描述】:
如何检查单个提交是否已应用于特定分支?
以git-cherry的文档为例:
$ git log --graph --oneline --decorate --boundary origin/master...topic
* 7654321 (origin/master) upstream tip commit
[... snip some other commits ...]
* cccc111 cherry-pick of C
* aaaa111 cherry-pick of A
[... snip a lot more that has happened ...]
| * cccc000 (topic) commit C
| * bbbb000 commit B
| * aaaa000 commit A
|/
o 1234567 branch point
$ git cherry origin/master topic
- cccc000... commit C
+ bbbb000... commit B
- aaaa000... commit A
我如何知道cccc000 与- cccc111 具有相同的内容而无需处理整个树?这可能吗?
注意git-cherry 依赖于补丁内容(差异),这是问题的关键。
【问题讨论】:
标签: git patch git-cherry