Daily Software Tips & Tricks

Bite-sized knowledge to improve your coding skills daily.

Clean Up Your History with Fixup Commits

May 12, 2026

Ever find yourself making tiny "typo fix" or "forgot a file" commits that clutter your pull request? Instead of a standard commit, try using git commit --fixup <hash>. This marks the new commit as a fix for a specific previous one.

When you're ready to merge, running git rebase -i --autosquash will automatically fold those tiny fixes into the original commits. It keeps your project history pristine and professional without the manual effort of moving lines around in an interactive rebase.