推送后如何压缩git中的提交?
这很好地解释了压缩多个提交: http://git-scm.com/book/en/Git-Branching-Rebasing 但不适用于已经推送的提交。如何在本地和远程存储库中压缩最近的几次提交? 编辑:当我这样做时git rebase -i origin/master~4 master,将第一个保留为pick,将其他三个保留为squash,然后退出(通过emacs中的cx cc),我得到: $ git rebase -i origin/master~4 master # Not currently on any branch. nothing to commit (working directory clean) Could not apply 2f40e2c... Revert "issue 4427: bpf device permission change option added" $ git rebase -i origin/master~4 master Interactive rebase already started …