DEV Community

Toolloom
Toolloom

Posted on • Originally published at toolloom.com on

Mastering the Art of the Clean Git History

Ever looked back at your branch and seen a dozen "fix typo" or "wip" commits? Before you open that PR, try using git rebase -i HEAD~n (where n is the number of commits). It opens an interactive editor where you can "squash" those tiny, messy commits into one clean, descriptive feature commit. It makes the reviewer's life easier and keeps your main branch history readable for everyone else down the line.

Top comments (0)