Git Rebase to Squash Commits to Most Recent Message

from blog nickb.dev, | ↗ original
You’ve been working on a development branch over a couple days, testing things out and exploring solutions. You aren’t comfortable losing work, so you create superficial commits. They’re only for you so that you can recover prior work or failed experiments. Finally you arrive at a suitable solution and painstakingly create a commit with a message...