reka (3) [Avatar] Offline
#1
on the NOTE Why are small commits better?

I think it's a rather good idea to include a section with this topic, even if it is not Git-specific.

I would also mention a further advantage of small commits:
It goes well with the philosophy of TDD: making small changes and observing the impact of them (isolated from other changes).

On the other hand I also see some possible disadvantages of small commits:
A) the history can become quite long
B) it can be difficult to detect commits that "belong together". E. g. if you want to revert a feature, it can be tedious to review all the 20 or 30 commits of yesterday, and pick the relevant ones out.
(It has already happened to me some times at work in our svn repo, where several other people also make commits.)

As I read later in 1.5.4 about rewriting history and squashing, I thought that it can often solve exactly such problems.
Perhaps it would be worth considering to provide a link to the section about squashing.
Mike McQuaid (83) [Avatar] Offline
#2
Re: MEAP 1.5.1 small commits
I'd rather not get into TDD as I'd need to explain the basics of the process and I'm not a practitioner myself. I'll definitely bear in mind what you've said, though, and I'll clarify some of these issues more later in the book.

In terms of squashing I don't want to get into too much detail too early on. I will be going through the whole book and linking up sections appropriately at a later time (the contents still isn't totally final until it's written and reviewed).

Thanks for your comments though; food for thought!