Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Clean Up Your Git History with Fixup
February 24, 2026
Ever find yourself making five tiny commits just to fix a typo or a small logic error? Instead of cluttering your history, use git commit --fixup followed by the commit hash. This marks your new change as a correction to a previous commit.
When you're ready to push, run git rebase -i --autosquash, and Git will automatically merge those tiny fixes into the original commit for you. It keeps your pull requests looking professional and your history readable without the manual effort of a standard interactive rebase.