Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Mastering Intentional Commits with Git Patch

March 20, 2026

Ever found yourself halfway through a feature only to realize you’ve fixed three unrelated bugs and tweaked some formatting? Instead of dumping everything into one messy commit, try using git add -p. This opens an interactive mode that lets you review every single change hunk by hunk. You can decide to stage it, skip it, or even split it into smaller pieces. It’s the easiest way to keep your pull requests clean and your commit history readable. Your future self and your reviewers will thank you for not making them untangle a giant blob of code.