Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Stop Creating "Fix Typo" Commits
April 7, 2026
We've all been there—you push a commit, realize you left a console.log or a typo, and end up with a messy history of "oops" commits. Instead of adding a new one, use `git commit --amend --no-edit` to tuck those tiny changes into your last commit. It keeps your PRs clean and your senior devs happy.
Just remember to only do this if you haven't pushed to a shared branch yet. Amending changes the commit hash, which means you'll have to force-push if the original commit is already on the server. Use it wisely to keep that git graph looking professional!