DEV Community

Toolloom
Toolloom

Posted on • Originally published at toolloom.com on

Keep Your Git History Clean with Fixups

We've all been there: you finish a feature, commit it, and then realize you left a console.log or a typo. Instead of creating a messy "oops" commit, use git commit --fixup followed by the commit hash. When you eventually run an interactive rebase with the --autosquash flag, Git will automatically merge that fix into the original commit for you. Your reviewers will appreciate the clean, logical history.

Top comments (0)