说
commit A^={toBeRemoved.txt, toBeModified.txt,old.txt}
commit A={file1.txt(new added),added.txt(new added),toBeModified.txt(modified since A^),old.txt}
commit originally pointed by Branch B={file1.txt,toBeModified.txt,old.txt}
然后
git checkout B
git cherry-pick A
将在分支B的顶端生成一个新的提交A',使得
A'={file1.txt(diff and merged,conflict possible),toBeModified.txt(diff and merged,conflict possible),added.txt,old.txt(from branch B)}
我不确定手册中“ 应用由提交引入的更改 ”的含义。我认为A对A ^引入的更改仅涉及+ added.txt 和- toBeRemoved.txt < / strong>。至于文件 toBeModified.txt ,无论自A ^以来是否真的进行过修改,总是有可能引起冲突,就像 file1.txt ,可能需要手动合并。换句话说,最终A'的外观不仅取决于A和A ^,还取决于A'将降落的分支B 。 我要确定我的理解是否正确,因为这部分使我困惑了很长时间。