Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Master the Art of Intentional Commits

May 7, 2026

Ever find yourself finishing a feature only to realize you’ve also fixed three unrelated bugs and added some "temporary" console logs? Instead of running a blind `git add .`, try using `git add -p`. This command breaks your changes into "hunks" and asks you to stage them one by one. It is essentially a built-in pre-commit review that ensures your commit history stays clean and focused.

Using the patch flag is a great habit for catching stray debug statements before they ever hit the repository. It forces you to look at every single line you changed, making you a more deliberate and careful developer.