Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Mastering the Patch with Git

March 15, 2026

Ever find yourself finishing a feature only to realize you've also fixed three unrelated bugs in the same file? Instead of committing everything in one giant, messy blob, try using git add -p. This opens an interactive mode that lets you review every change hunk by hunk. You can decide to stage specific parts, skip others, or even split a hunk into smaller pieces. It keeps your commit history clean and makes your pull requests much easier for your team to review.