4 ms·
> Rather, it means that you should be able to describe your changes with a single, meaningful message without trying to tack on additional information about som
by quantified 4y ago
> Rather, it means that you should be able to describe your changes with a single, meaningful message without trying to tack on additional information about some unrelated work that you did. Another way to define an atomic commit is one that can be reverted without any unwanted side effects or regressions, aside from what you’d expect based on its message. If a commit is removed from your git commit history but doing so removes other legitimate changes, then that commit wasn’t atomic.
I _think_ the author means small focused commits? There are no examples, so it's hard to tell. Reverting a commit that some has added tests for later will of course introduce regressions. And removing a commit will always only remove the changes of that commit, I think- what am I missing? Commits need to build, and ideally test, in an atomic unit. I'd rather see changes and the tests that validate these changes in a single commit.
- xmcqdpt2 4y ago100%, even if the commit is much larger. Doing a git bisect when the commits are large is not as useful as when they are small because you still need to find the bug within the large commit. However doing a git bisect on a repo where not all commits build or test right is a lot more frustrating.