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

Re: [RFC] git add -a

From
PKPekka Kaitaniemi <kaitanie@cc.helsinki.fi>
Date
Mar 6, 2008, 12:19 UTC
Message-ID
<20080306121937.GA11882@localdomain>
In-Reply-To
<alpine.LSU.1.00.0803061235060.15786@racer.site>
Hi,
On Thu, Mar 06, 2008 at 12:35:58PM +0100, Johannes Schindelin wrote:
Show 19 quoted lines
> Hi,
> 
> On Thu, 6 Mar 2008, Marc-André Lureau wrote:
> 
> > Hi,
> > 
> > On Thu, Mar 6, 2008 at 12:46 PM, Michele Ballabio
> > <barra_cuda@katamail.com> wrote:
> > >
> > >  There's "git add -u". It should do what you want.
> > >
> > 
> > Thanks for this answer :) I wonder why "-u" and not "-a".. After all
> > git commit "-a" could be "-s" if we follow that distinction
> > (Update/Stage/All).
> 
> Probably because some people would expect "git add -a" to do the same as 
> "git add .", i.e. add _all_ files (even the untracked ones), as opposed to 
> "git add -u", which updates all _tracked_ files.

Actually "git add -u" updates all tracked files in the _current_ directory and its subdirectories. So the current working directory acts as a "path limiter".

Pekka
Previous: Johannes Schindelin
Message 5 of 5 in “[RFC] git add -a”
  1. Marc-André LureauMar 6, 2008
  2. Michele BallabioMar 6, 2008
  3. Marc-André LureauMar 6, 2008
  4. Johannes SchindelinMar 6, 2008
  5. Pekka KaitaniemiMar 6, 2008

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.