Re: [PATCH 2/2] git-add -a: add all files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 20, 2008, 18:30 UTC
- Message-ID
- <7v4p6k8l36.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <76718490807200545l653bbda1l4d13f1e1e698c855@mail.gmail.com>
"Jay Soffian" <jaysoffian@gmail.com> writes:
Show 20 quoted lines
> On Sun, Jul 20, 2008 at 6:56 AM, Johannes Schindelin > <Johannes.Schindelin@gmx.de> wrote: >> Two things: >> >> - add and commit are two _different_ operations, not only in name, but >> also in nature. The fact that "commit -a" calls "add" is a _pure_ >> convenience. It does not change the fact that "add" and "commit" are >> completely, utterly different. >> >> - if you are a heavy user of "commit -a", chances are that your history is >> not really useful, because you committed unrelated changes accidentally >> in the same commit. >> >> The latter point, BTW, is the reason I _never_ teach the "-a" option >> (actually, I teach no option at all) in my first two Git lessons. > > I don't like "commit -a" and never use it and wonder why a > short-option was wasted on it. > > I do like the new "add -a" (thank you Junio) but I will rarely use it.
I do not understand either of you. If for whatever reason "add -A" makes sense in your workflow, it's a sign that you are extremely disciplined that changes in your working tree at one point of time where you would issue "add -A" are concentrated on a single topic, and at one of such points you may want to commit. For such a disciplined person, "commit -a" would make perfect sense there.
So for such people who would find "add -A" useful, "commit -a" will not be "unrelated changes in the same commit". And for such people, I would even say "commit -A" would be even more useful, too.
I'll never be in that camp of perfect people myself, though..