我的目标是显示分支A中提交的内容但不显示分支B中提交的内容。我知道以下两个主题中描述的现有命令:
Different commits between two branches
Using Git, show all commits that are in one branch, but not the other(s)
然而,如果我选择从B到A的提交,当我在A和B之间进行差异时,樱桃选择会一直显示在各种命令中。我在这里遗漏了一些基本内容。
以下是我尝试过的命令:
git log --cherry-pick --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cred%cn%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative B..A
git cherry B A
git log --oneline A ^B --no-merges
所有这些都继续显示已经挑选过的提交 这会导致错误的开发人员认为从一个分支到另一个分支缺少提交。
提前谢谢。