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

Re: Importing from tarballs; add, rm, update-index?

From
Alan Chandler <alan@chandlerfamily.org.uk>
Date
Jan 13, 2007, 18:15 UTC
Message-ID
<200701131815.27481.alan@chandlerfamily.org.uk>
In-Reply-To
<E5A7E6A8-45FF-4A7A-A31E-DFEBAD48DF1C@silverinsanity.com>
Show 9 quoted lines
> I was referring to adding Linus' rant...  And maybe several others.
> I tend to find his rants at least slightly amusing, highly
> informative, and I tend to end up agreeing.  I have very little
> opinion on your complaint so long as the system works consistently.
> "git commit -a" is still my most common workflow.  I've used git-add
> (and prior to that git-update-index) from time to time when I fix
> bugs that need to be separate from my current work, but far far more
> common is "I finished this chunk of functionality, add all the
> changes I did to make it happen".

I think the fact that this thread has come alive again implies we didn't bottom it last time through.

One thing, in particular, has been bugging me with the hide the index concept - that is, its still necessary to git add files for them to be picked up with git commit -a

My (albeit limited) experience with using git is at home coding a java application for my web site using eclipse. During the application development when I am initially coding the application, or when I am doing a major update that adds new pages to my site then I have to remember to git add files. My immediate instinct is do do commands of the form

git add Javasource/uk/org/chandlerfamily/appname/tapestry/pages/subdir/xxx.java

and git add Webcontent/subdir/xxx.html

which even with bash completion is a pain to enter.

(although that is probably harder than it needs to be - can't I just do git add . ?)

I don't know whether we have had the debate here - if we have done it would have been in the very very early days, but subject to the .gitignore rules what would be the implications of a git commit -a that automatically adds any files within the directory (and subdirectories) in which it is issued.

Then I think you don't even have to get into what is git add all about until you get to the "use the index" stage.

I am (at the moment - but I am good at changing my mind) in the side of giit add for both adding new paths and updating content. This is purely pragmatic - don't have to remember which one I am trying to do.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Previous: Brian GernhardtNext: Brian Gernhardt
Message 23 of 38 in “Importing from tarballs; add, rm, update-index?”
  1. Chris RiddochJan 12, 2007
  2. Morten WelinderJan 12, 2007
  3. Junio C HamanoJan 12, 2007
  4. Peter BaumannJan 12, 2007
  5. Junio C HamanoJan 12, 2007
  6. Peter BaumannJan 12, 2007
  7. Junio C HamanoJan 13, 2007
  8. Peter BaumannJan 13, 2007
  9. Johannes SchindelinJan 13, 2007
  10. Peter BaumannJan 13, 2007
  11. Julian PhillipsJan 13, 2007
  12. Junio C HamanoJan 13, 2007
  13. Carl WorthJan 13, 2007
  14. Brian GernhardtJan 13, 2007
  15. Peter BaumannJan 13, 2007
  16. Nicolas PitreJan 13, 2007
  17. Carl WorthJan 13, 2007
  18. Junio C HamanoJan 13, 2007
  19. Nicolas PitreJan 13, 2007
  20. Brian GernhardtJan 13, 2007
  21. Peter BaumannJan 13, 2007
  22. Brian GernhardtJan 13, 2007
  23. Alan ChandlerJan 13, 2007
  24. Brian GernhardtJan 13, 2007
  25. Shawn O. PearceJan 13, 2007
  26. Johannes SchindelinJan 14, 2007
  27. Shawn O. PearceJan 14, 2007
  28. Junio C HamanoJan 15, 2007
  29. Shawn O. PearceJan 15, 2007
  30. Daniel BarkalowJan 15, 2007
  31. Horst H. von BrandJan 16, 2007
  32. Daniel BarkalowJan 16, 2007
  33. Christian MICHONJan 16, 2007
  34. Jakub NarebskiJan 16, 2007
  35. Carl WorthJan 12, 2007
  36. Johannes SchindelinJan 12, 2007
  37. Junio C HamanoJan 13, 2007
  38. Jakub NarebskiJan 12, 2007

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.