根据其手册页,git cherry
进行一些测试以确定是否应将提交樱桃挑选到另一个分支:
The equivalence test is based on the diff, after removing whitespace
and line numbers. git-cherry therefore detects when commits have been
"copied" by means of git-cherry-pick(1), git-am(1) or git-rebase(1).
我想创建一个脚本,通过删除只会更改某个文件的所有提交来进一步最小化精选候选列表。
例如,如果将更改文件 A、B、C 的樱桃采摘提交 1 更改到我的分支中,则只会更改文件 A,而 B 和 C 已经包含更改,我希望脚本从候选列表中删除提交。
换句话说,如果我按照 的建议挑选了一个提交git cherry
,并且生成的提交只会更改文件 A,而不会更改其他文件,我想将它从我的列表中删除。
有没有一种简单的方法可以从 Git 中获取这些信息?