Atomic Commit Convention
When using a revision control systems a common convention is to use small commits. These are sometimes referred to as atomic commits as they (ideally) only affect a single aspect of the system. These atomic commits allow for greater understandability, less effort to roll back changes, easier bug identification.
The greater understandability comes from the small size and focused nature of the commit. It is much easier to understand what is changed and reasoning behind the changes if you are only looking for one kind of change. This becomes especially important when making format changes to the source code. If format and functional changes are combined it becomes very difficult to identify useful changes. Imagine if the spacing in a file is changed from using tabs to three spaces every tab in the file will show as having been changed. This becomes critical if some functional changes are also made as a reviewer may simply not see the functional changes.
If only atomic commits are made then commits that introduce errors become much simpler to identify. You are not required to look though every commit to see if it was the cause of the error, only the commits dealing with that functionality need to be examined. If the error is to be rolled back atomic commits again make the job much simpler. Instead of having to revert to the offending revision and remove the changes manually before integrating any later changes; the developer can simply revert any changes in the identified commit. This also means that a developer will not remove changes that did not cause the error by accident.
Atomic commits also allow bug fixes to be easily reviewed if only a single bug fixes committed at a time. Instead of having to check multiple potentially unrelated files the reviewer must only check files and changes that directly impact the bug being fixed. This also means that bug fixes can be easily packaged for testing as only the changes that fix the bug are in the commit.
Read more about this topic: Atomic Commit
Famous quotes containing the words atomic, commit and/or convention:
“Other centuries had their driving forces. What will ours have been when men look far back to it one day? Maybe it wont be the American Century, after all. Or the Russian Century or the Atomic Century. Wouldnt it be wonderful, Phil, if it turned out to be everybodys century, when people all over the worldfree peoplefound a way to live together? Id like to be around to see some of that, even the beginning.”
—Moss Hart (19041961)
“In her is the end of breeding.
Her boredom is exquisite and excessive.
She would like some one to speak to her,
And is almost afraid that I
will commit that indiscretion.”
—Ezra Pound (18851972)
“No convention gets to be a convention at all except by grace of a lot of clever and powerful people first inventing it, and then imposing it on others. You can be pretty sure, if you are strictly conventional, that you are following geniusa long way off. And unless you are a genius yourself, that is a good thing to do.”
—Katharine Fullerton Gerould (18791944)