Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Fix that Typo Before Anyone Sees It

February 12, 2026

We’ve all been there: you hit enter on a commit only to realize you left a typo in the message or forgot to stage a single file. Instead of creating a 'Fix typo' follow-up commit that clutters the history, use git commit --amend. If you just need to update the message, it’ll pop open your editor and let you rewrite it on the fly.

If you forgot a file, stage it first with git add, then run the amend command with the --no-edit flag. This tucks the changes into your last commit silently, keeping your branch history looking clean and professional.