Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Atomic Commits with Interactive Patching

May 19, 2026

We’ve all been there: you’re halfway through a feature and realize you fixed a typo and tweaked a config file in the same session. Instead of lumping everything into one messy commit, use git add -p. This "patch" mode lets you review every single change—or "hunk"—and decide whether to stage it or not.

This practice encourages atomic commits, making your pull requests much cleaner and easier for your teammates to review. If you see a change that doesn't belong in the current task, you can simply skip it and commit it later, keeping your project history organized and professional.