I want to combine multiple historic commits together, while not touching the recent ones, as shown in the picture, I want to only combine the 2-4 commits together.
After reading relevant answers and posts, I have tried git rebase - i HEAD~5
and fix and rename commits in vim, but I found this would combine them into one commit. Is there a way that I can combine the middle commits, while leaving the more recent commits untouched?