考虑以下本地分支上的一系列提交:
5 Correction of something meaningless, again !
4 Business correction n°3
3 Correction of something meaningless
2 Business correction n°2
1 Business correction n°1
我想用 3 压缩 5 以获得:
4 Correction of something meaningless, squashed !
3 Business correction n°3
2 Business correction n°2
1 Business correction n°1
我可以使用交互式变基来做到这一点吗?从我所看到的(例如:https ://www.internalpointers.com/post/squash-commits-into-one-git )和迄今为止的测试来看,我只能通过一系列直接提交来压缩 5,例如:
- 4
- 4 3
- 4 3 2
- 4 3 2 1