Re: most commonly used git commands?
- From
Josh Triplett <josh@freedesktop.org>
- Date
- Jun 28, 2007, 02:30 UTC
- Message-ID
- <46831D32.4090900@freedesktop.org>
- In-Reply-To
- <46a038f90706271917j7abb4bddu21debafe3461c695@mail.gmail.com>
Martin Langhoff wrote:
Show 23 quoted lines
> On 6/25/07, Junio C Hamano <gitster@pobox.com> wrote: >> "Michael S. Tsirkin" <mst@dev.mellanox.co.il> writes: >>>> Quoting Junio C Hamano <gitster@pobox.com>: >>>> Perhaps they are most commonly used by the person who came up >>>> with that list first ;-)? >>>> >>>> I think "add" deserves to be there, I am not sure "apply" is. >>> git add is supposed to be rare, no? >>> That's why git commit lists file additions/removals ... >> No. You are talking in terms of pre-1.5 git. The semantics of >> "git add" has been clarified since then --- it adds contents, >> and is not about telling git that there are new files it did not >> know so far. > > In other words - git-add is also a (semantically good) alias for > git-update-index. > > So you "add" files to the next commit. Whether they are "new" to git > or just changed it doesn't matter that much in that situation. And > git-commit will look at those files that have been "added". > > Makes things a whole lot easier to explain. I didn't understand it > initially, now I'm completely sold on the concept.
Agreed; this change converted me from a "git commit -a" user to a big fan of the index.
- Josh Triplett