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

Re: [PATCH 1/2] Documentation: 'git add -A' can remove files

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Dec 7, 2009, 00:57 UTC
Message-ID
<20091207005732.GA20909@atjola.homenet>
In-Reply-To
<7vr5r7el2q.fsf@alter.siamese.dyndns.org>
On 2009.12.06 15:31:25 -0800, Junio C Hamano wrote:
> I wonder if we can restructure the description of "-u" to make it easier
> to read, to simplify the description of "-A".
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.
So maybe something like this?
-u, --update
    Instead of matching <filepattern> against files in the working tree,
    it is matched against the already tracked files in the index. This
    means that it won't find any new files, but can find files already
    deleted from the working tree and remove them from the index. Also,
    if no <filepattern> is given, this option will make it default to
    ".", updating all tracked files in the current directory and its
    subdirectories.
-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.
Björn
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Documentation: 'git add -A' can remove files”
  1. 1/2 Documentation: 'git add -A' can remove filesBjörn Gustavsson, Dec 6, 2009
  2. Junio C HamanoDec 6, 2009
  3. Björn SteinbrinkDec 7, 2009
  4. Junio C HamanoDec 7, 2009
  5. Björn SteinbrinkDec 7, 2009
  6. Junio C HamanoDec 7, 2009

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.