【发布时间】:2020-10-29 22:21:05
【问题描述】:
我正在尝试将前 14 个提交压缩在一起:git rebase -p -i HEAD~14。下图显示了我要压缩的提交。提交f101fff106d、6a1cb904b73、89001a588c3、656d21e1bfa 是我对develop 所做的合并。
问题是,在我存在 rebase 后,我收到以下错误:
拒绝压缩合并:656d21e1bfa84b866031e904c303662878370d14
我不明白为什么会出现这个错误。我该如何解决?
pick 290c32355fd Squash all commits
s 4aa246bc4c5 Squash Commits
s 656d21e1bfa merge with develop
s a7448275954 tasks to do
s 4c6198cd0f0 fix print
pick f101fff106d Merge remote-tracking branch 'origin' into into TEST_ENGINE
s 30f9adbe65a remove unused check
s 7343e3565ad fix error
s 1e3dc014f67 fix isokToupdate
s c16412a7f83 fix isokToupdate
pick 6a1cb904b73 Merge remote-tracking branch 'origin' into TEST_ENGINE
pick 89001a588c3 Merge remote-tracking branch 'origin' into TEST_ENGINE
s a32ce67d389 fix namespace
s 2d0c8ee55e8 Refactor code and correct functional errors
# Rebase a2c59ed4e21..2d0c8ee55e8 onto a2c59ed4e21 (14 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
【问题讨论】: