From: Björn Steinbrink Date: Mon, 07 Dec 2009 00:57:32 GMT Subject: Re: [PATCH 1/2] Documentation: 'git add -A' can remove files 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 " looks at the working tree to find files matching . "git add -u " looks at the index, and "git add -A " 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 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 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 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