DEV Community

Discussion on: Why should you write good commits?

Collapse
 
jessekphillips profile image
Jesse Phillips

I decided to write articles specifically because of this topic.

My bar for atomic can be a little lower. Separating code change from new tests can be clearer. Test changes can touch many files and risk hiding where the actual code changes are during review.

Being is QA, it can be nice to have test commits broken into many as well.

dev.to/jessekphillips/git-is-a-com...

Collapse
 
erykpiast profile image
Eryk Napierała

For me, personally, it depends. If I introduce new test specifically because the change I made, I'd rather keep both within a single commit.

But, if during my work I spot some uncovered case for example, I create a separate commit with that specific test.