Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
The Power of Partial Commits
February 24, 2026
We've all been there: you've spent an hour coding and realized you fixed three different bugs in five different files. Instead of dumping everything into one messy commit, use 'git add -p'. This 'patch' mode walks you through every single change hunk by hunk.
You can choose to stage a specific change, skip it, or even split a hunk into smaller pieces if you've modified two different things close together. It makes your git history much cleaner and forces you to do one last code review before you hit that commit button.