Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Master the Art of Partial Commits

February 22, 2026

Ever find yourself halfway through three different fixes when you realize you should have committed the first one ten minutes ago? Instead of committing everything at once, use `git add -p`. This interactive mode lets you review "hunks" of code and decide exactly which changes go into the next commit.

It’s a lifesaver for keeping your pull requests clean and your commit history readable. By staging only what belongs to a specific logic change, you make life much easier for your reviewers and your future self when you're inevitably hunting down a bug using git bisect.