From: Junio C Hamano <gitster@pobox.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: "Björn Gustavsson" <bgustavsson@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] Documentation: 'git add -A' can remove files
Date: Sun, 06 Dec 2009 23:34:03 -0800 [thread overview]
Message-ID: <7vbpib9r10.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20091207005732.GA20909@atjola.homenet> ("Björn Steinbrink"'s message of "Mon\, 7 Dec 2009 01\:57\:32 +0100")
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
> What I usually say on #git is something like:
>
> "git add <path>" looks at the working tree to find files
> matching <path>. "git add -u <path>" looks at the index, and
> "git add -A <path>" looks at both. Therefore "add" and "add -A"
> can add new files to the index, and "add -u" and "add -A" can
> remove files from it.
>
> And for convenience, -u and -A default to "." as the path argument.
Hmm, an interesting way of teaching. How effective is it with the real new
to mid-level users we see on the #git channel?
> So maybe something like this?
> ...
> -A, --all
> Like -u, but matches <filepattern> against files in the index in
> addition to the files in working tree. This means that it can find
> new files as well.
Sounds easier to read to me but I think this description of "-A" seems
backwards from your explanation. "Like -u" means "matches the index" and
the difference is it in addition matches with the work tree, so it should
probably be the other way around, i.e.
Like -u, but matches <filepattern> against files in the work tree in
addition to the index. This means that it can find new files as well.
next prev parent reply other threads:[~2009-12-07 7:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 23:03 [PATCH 1/2] Documentation: 'git add -A' can remove files Björn Gustavsson
2009-12-06 23:31 ` Junio C Hamano
2009-12-07 0:57 ` Björn Steinbrink
2009-12-07 7:34 ` Junio C Hamano [this message]
2009-12-07 8:48 ` Björn Steinbrink
2009-12-07 0:05 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vbpib9r10.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=B.Steinbrink@gmx.de \
--cc=bgustavsson@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.