我正在尝试压缩一系列提交 - HEAD 到 HEAD~3。有没有一种快速的方法可以做到这一点,或者我需要使用 rebase --interactive ?
确保你的工作树是干净的,然后
git reset --soft HEAD~3 git commit -m 'new commit message'