答案 0 :(得分:1)
如果你不想看到它们只是压缩这些提交。
请注意,压缩提交不会删除您的提交,但会对一个提交进行多次提交。
修改强>
尝试使用此命令进行压缩:
git rebase -i HEAD~4
结果:
pick 01d1124 Adding license
pick 6340aaa Moving license into its own file
pick ebfd367 Jekyll has become self-aware.
pick 30e0ccb Changed the tagline in the binary, too.
# Rebase 60709da..30e0ccb onto 60709da
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
答案 1 :(得分:0)
只需运行以下命令将它们合并在一起:
git reset --soft HEAD~14 &&
git commit
然后,按下面的方式推送,-f
代表强制:
git push -f