Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Mastering Granular Commits with Patch Mode
April 18, 2026
Ever find yourself finishing a long coding session only to realize you’ve touched five different files for three different reasons? Instead of dumping everything into one giant "fix stuff" commit, try using git add -p. This "patch" mode walks you through every single change (or "hunk") in your code and asks if you want to stage it. It’s a lifesaver for keeping your commit history clean and readable for your future self and your teammates.