# I suggest that git commit support -A option, just like hg does.thanks.

7 messages from 2011-08-06 to 2011-08-08. Participants: jelly, Magnus Bäck, Marc Weber, Miles Bader, Junio C Hamano, Michael Witten.
Thread: https://gitlist.dev/t/28033

## jelly, 2011-08-06 14:32

Subject: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <35a2b515.12f42.1319f82c79d.Coremail.sinojelly@163.com>
URL: https://gitlist.dev/e/35a2b515.12f42.1319f82c79d.Coremail.sinojelly%40163.com

```
$ hg help commit
hg commit [OPTION]... [FILE]...
          -A --addremove            mark new/missing files as added/removed before committing

```

## Magnus Bäck, 2011-08-06 15:02

Subject: Re: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <20110806150246.GA20650@jpl.local>
URL: https://gitlist.dev/e/20110806150246.GA20650%40jpl.local
In-Reply-To: <35a2b515.12f42.1319f82c79d.Coremail.sinojelly@163.com>

```
On Saturday, August 06, 2011 at 16:32 CEST,
     jelly <sinojelly@163.com> wrote:

> $ hg help commit
> hg commit [OPTION]... [FILE]...
>           -A --addremove            mark new/missing files as added/removed before committing

It seems like you're looking for the -A option to "git add".

-- 
Magnus Bäck                   Opinions are my own and do not necessarily
SW Configuration Manager      represent the ones of my employer, etc.
Sony Ericsson

```

## jelly, 2011-08-06 16:17

Subject: Re:Re: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <4d88745.134ea.1319fe29f01.Coremail.sinojelly@163.com>
URL: https://gitlist.dev/e/4d88745.134ea.1319fe29f01.Coremail.sinojelly%40163.com
In-Reply-To: <20110806150246.GA20650@jpl.local>

```
>It seems like you're looking for the -A option to "git add".

I don't want to run "git add -A" before commit, 
I want to use "git commit -A -m 'msg' " instead.

```

## Marc Weber, 2011-08-06 19:35

Subject: Re:Re: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <1312659297-sup-2956@nixos>
URL: https://gitlist.dev/e/1312659297-sup-2956%40nixos
In-Reply-To: <4d88745.134ea.1319fe29f01.Coremail.sinojelly@163.com>

```
Excerpts from jelly's message of Sat Aug 06 18:17:34 +0200 2011:
> >ItÂ seemsÂ likeÂ you'reÂ lookingÂ forÂ theÂ -AÂ optionÂ toÂ "gitÂ add".
> 
> I don't want to run "git add -A" before commit,Â 
> I want to use "git commit -A -m 'msg' " instead.

if you need it that often add to your .bashrc:
gcA(){ git add -A && git commit -m "$@"; }

which is even faster.

Marc Weber

```

## Miles Bader, 2011-08-08 04:33

Subject: Re: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <buoy5z4ed3w.fsf@dhlpc061.dev.necel.com>
URL: https://gitlist.dev/e/buoy5z4ed3w.fsf%40dhlpc061.dev.necel.com
In-Reply-To: <1312659297-sup-2956@nixos>

```
Marc Weber <marco-oweber@gmx.de> writes:
>> I don't want to run "git add -A" before commit,Â 
>> I want to use "git commit -A -m 'msg' " instead.
>
> if you need it that often add to your .bashrc:
> gcA(){ git add -A && git commit -m "$@"; }
>
> which is even faster.

Remember:  "just add an alias!" is an acceptable answer only if the
desired feature is odd/unusual.  For desired features that are likely
to be generally useful, git should do the right thing, out of the box,
for everybody.

Which case this particular request falls into, is a matter of
judgement, but such a feature looks "generally useful" to me.

The annoying thing, of course, is that commit and add already have
inconsistent long options for this type of functionality (commit --all
vs add --all). [I'd consider that a bug, regardless of whether commit
gets -A type functionality, but I suppose it's too late to fix...]

-Miles

-- 
Absurdity, n. A statement or belief manifestly inconsistent with one's own
opinion.

```

## Junio C Hamano, 2011-08-08 04:56

Subject: Re: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <7vfwlc1ox1.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfwlc1ox1.fsf%40alter.siamese.dyndns.org
In-Reply-To: <buoy5z4ed3w.fsf@dhlpc061.dev.necel.com>

```
Miles Bader <miles@gnu.org> writes:

> Remember:  "just add an alias!" is an acceptable answer only if the
> desired feature is odd/unusual.  For desired features that are likely
> to be generally useful, git should do the right thing, out of the box,
> for everybody.

The reason I deliberately chose to use capital letter in "add -A" even
when we do not have "add -a" was exactly so that interested parties can do
"commit -A" to match it (and "commit -a" is doing the _right_ thing out of
the box, and its behaviour will not change). Hopefully you can take it as
a strong hint that I personally do not think "commit -A" is without merit.

So far, nobody stepped up to do it, though. I have been taking it as a
sign that "commit -A" is not one of the commonly desired features but is
probably closer to your "odd/unusual". It's up to the user/developer
community to change that ;-)

```

## Michael Witten, 2011-08-08 14:04

Subject: Re: I suggest that git commit support -A option, just like hg does.thanks.
Message-ID: <CAMOZ1BtVy5m0i2co-YEjxGxzMVHpq01vSn0P7UkURHu=AQ=gsA@mail.gmail.com>
URL: https://gitlist.dev/e/CAMOZ1BtVy5m0i2co-YEjxGxzMVHpq01vSn0P7UkURHu%3DAQ%3DgsA%40mail.gmail.com
In-Reply-To: <7vfwlc1ox1.fsf@alter.siamese.dyndns.org>

```
On Mon, Aug 8, 2011 at 04:56, Junio C Hamano <gitster@pobox.com> wrote:
> So far, nobody stepped up to do it, though. I have been taking it as a
> sign that "commit -A" is not one of the commonly desired features but is
> probably closer to your "odd/unusual". It's up to the user/developer
> community to change that ;-)

With regard to anything that can be changed for the better, the vast
majority of people shrug their shoulders, groan, and use what's
already available to them.

```
