threads / rfc / 12536

[RFC] git add -a

Subject: [RFC] git add -a

## tl;dr

5 messages between Mar 6, 2008 and Mar 6, 2008.

replies: 4people: 4as markdown or json

Marc-André Lureau· Mar 6, 2008, 10:23 UTC · lore
Hello,
What about "git add -a" ? I am in a situation where I'd like it :)

Of course, I could do a commit -a and amend later, but that does not have the same meaning for me. Tell me what you think.

Thanks
-- 
Marc-André Lureau
Marc-André Lureau· Mar 6, 2008, 10:57 UTC · re: Michele Ballabio · lore

Re: [RFC] git add -a

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).

Regards,
-- 
Marc-André Lureau
Johannes Schindelin· Mar 6, 2008, 11:35 UTC · re: Marc-André Lureau · lore

Re: [RFC] git add -a

Hi,
On Thu, 6 Mar 2008, Marc-André Lureau wrote:
Show 11 quoted lines
> 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.

Hth, Dscho

Pekka Kaitaniemi· Mar 6, 2008, 12:19 UTC · re: Johannes Schindelin · lore

Re: [RFC] git add -a

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

← back to recent threads