git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] make 'git add' a first class user friendly interface to the index

From
Alan Chandler <alan@chandlerfamily.org.uk>
Date
Dec 2, 2006, 18:05 UTC
Message-ID
<200612021805.09143.alan@chandlerfamily.org.uk>
In-Reply-To
<87psb22qgu.wl%cworth@cworth.org>
On Saturday 02 December 2006 16:49, Carl Worth wrote:
Show 22 quoted lines
> On Sat, 2 Dec 2006 08:28:57 +0000, Alan Chandler wrote:
> > There is a conceptual difference between thinking that git-add is about
> > adding a file and git-add adding the current state of a files content.
>
> Yes, there is.
>
> >                                                                 If your
> > conceptual model is the first of these - then I can see why you see a
> > problem with git-add being used to say a files contents have changed.
>
> Yes. (And of course, I personally understand the second conceptual
> model. But there are a lot of "brain-damaged" people out there.)
>
> > However, if you regard the git-add command is "adding the current content
> > of the file to a staging area" , and you say this is an SCM which by
> > definition keeps the history of things once its been told about them I
> > don't see why there is a need for a different name for the operation the
> > first time and for the operation later.
>
> Yes, that's also true. Once you know the model then you wouldn't need
> two different commands. One can certainly get by with just the
> functionality of "update-index" for everything.
...
Show 6 quoted lines
> So all of the conditions above, ("if your conceptual model is", "if
> you regard the git-add command", "if taught to use git-add up front",
> "if we effectively teach 'commit -a' first"), are barriers to learning
> git. We can't guarantee these are all met for new users, and when
> they're not, the users can get confused.
>

The argument I was _trying_ to make was that we should teach the second conceptual model not the first one AND stick with just the git add command (in response to your (Carl's) statement earlier in the thread that there needs to be two separate commands) . My if statements were to illustrate that there are two fundamental ways of looking at this, not lots of ifs that newbies would have to consider. We should up-front (in the tutorial, in appropriate man pages) use the one conceptual model (and I also like Junio's argument that git should take an aggressive stance of this is how the conceptual model is rather than the "contrary to ..." approach).

-- 
Alan Chandler
Previous: Jakub NarebskiNext: Nicolas Pitre
Message 14 of 21 in “make 'git add' a first class user friendly interface to the index”
  1. make 'git add' a first class user friendly interface to the indexNicolas Pitre, Dec 1, 2006
  2. Junio C HamanoDec 1, 2006
  3. Alan ChandlerDec 2, 2006
  4. Nicolas PitreDec 2, 2006
  5. Nicolas PitreDec 2, 2006
  6. Carl WorthDec 2, 2006
  7. Junio C HamanoDec 2, 2006
  8. Carl WorthDec 2, 2006
  9. Jakub NarebskiDec 2, 2006
  10. Han-Wen NienhuysDec 2, 2006
  11. Alan ChandlerDec 2, 2006
  12. Carl WorthDec 2, 2006
  13. Jakub NarebskiDec 2, 2006
  14. Alan ChandlerDec 2, 2006
  15. Nicolas PitreDec 3, 2006
  16. Nicolas PitreDec 3, 2006
  17. Nicolas PitreDec 3, 2006
  18. Jakub NarebskiDec 2, 2006
  19. Nicolas PitreDec 3, 2006
  20. make 'git add' a first class user friendly interface to the indexNicolas Pitre, Dec 3, 2006
  21. Alan ChandlerDec 3, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.