我一直在尝试使用
git log --no-merges --cherry-pick --right-only master...my-branch
生成在 my-branch 中但不在 master 中的提交列表(根据 git-log 文档)。但是,列表中仍然有许多等效的提交。如果我展示它们和它们的补丁,除了提交 ID 之外没有任何区别。
git show 16cbd0e47406a4f7acbd6dc13f02d74d0b6a7621 >patcha
git show c53c7c32dcd84bfa7096a50b27738458e84536d5 >patchb
diff patcha patchb
1c1
< commit 16cbd0e47406a4f7acbd6dc13f02d74d0b6a7621
---
> commit c53c7c32dcd84bfa7096a50b27738458e84536d5
甚至git patch-id
显示它们是等价的:
git show c53c7c32dcd84bfa7096a50b27738458e84536d5 | git patch-id
2b5504fb9a8622b4326195d88c7a20f29701e62b c53c7c32dcd84bfa7096a50b27738458e84536d5
git show 16cbd0e47406a4f7acbd6dc13f02d74d0b6a7621 | git patch-id
2b5504fb9a8622b4326195d88c7a20f29701e62b 16cbd0e47406a4f7acbd6dc13f02d74d0b6a7621
如何不git log --cherry-pick
将这些作为重复项?