Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Keep your git history clean with interactive rebasing
April 8, 2026
Ever looked back at a pull request and seen twenty commits titled "fix typo" or "trying again"? It happens to the best of us, but you can tidy that up before merging. Use git rebase -i HEAD~n (where n is the number of commits) to open an interactive menu. From there, you can "squash" those tiny incremental changes into a single, meaningful commit.
This doesn't just look prettier; it makes the project history much easier to navigate when you're trying to find exactly when a specific feature was introduced. Your teammates will definitely thank you during code reviews for providing a clean, logical narrative of your changes.