Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Mastering the Surgical Commit

February 19, 2026

Ever find yourself halfway through a feature only to realize you've fixed three unrelated bugs and formatted the whole file? Instead of using git add ., try using git add -p. This patch mode lets you review every single change, or hunk, individually. You can decide to stage it, skip it, or even manually edit the hunk if you only want to commit a specific line. It’s a game-changer for keeping your pull requests clean and your commit history readable.