【发布时间】:2020-02-10 16:23:07
【问题描述】:
我正在尝试将分支 B 的提交合并到分支 A。
branch A has commits a-c
branch B has commits d-f BUT doesn't have commits a-c in it's commit history.
如何让分支 B 的提交 d-f 在提交 c 后显示在分支 A 中。
我试过git cherry-pick hashCommit,但我收到一条消息说
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git reset'
我还查看了这个 SO post,但不确定哪个答案适合我。
当我查看我的 github 页面分支 B 时,在顶部它说分支 B 是分支 A 之前的 x 次提交
同样在执行cherry-pick 之后,当我输入 git log 时,会显示第一次提交
commit hashCommitNumber (HEAD -> branchB, origin/branchB, branchA)
我目前在 B 分店签出
【问题讨论】:
标签: git github rational-team-concert