DEV Community

loading...

Discussion on: I'm a Git Master, Ask Me Anything

Collapse
stecman profile image
Stephen Holdaway

I'd check out the article Writing Reviewable Code - commit messages are one of the things I see most underutilized. Having a body and explaining why changes were made is really helpful to both the author (they have to think about what they've changed) and to future readers who can see the code change but not the context for the change.

A useful rule of thumb for anyone scared of Git is that once you commit something, it's very hard to destroy that data. Rebase, reword, squash and fix-up as you want, and keep a clean history full of useful, searchable information for your project.