From: Junio C Hamano Date: Mon, 07 Dec 2009 07:34:03 GMT Subject: Re: [PATCH 1/2] Documentation: 'git add -A' can remove files Message-ID: <7vbpib9r10.fsf@alter.siamese.dyndns.org> In-Reply-To: <20091207005732.GA20909@atjola.homenet> Björn Steinbrink writes: > 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. 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 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 against files in the work tree in addition to the index. This means that it can find new files as well.