Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".
- From
Nicolas Pitre <nico@cam.org>
- Date
- Nov 30, 2006, 17:37 UTC
- Message-ID
- <Pine.LNX.4.64.0611301229290.9647@xanadu.home>
- In-Reply-To
- <Pine.LNX.4.64.0611300903080.3513@woody.osdl.org>
On Thu, 30 Nov 2006, Linus Torvalds wrote:
Show 6 quoted lines
> The default is: commit everything that you ask for to be committed. > > If you haven't marked anything to be committed (which you can do with "git > add" too, or with simply being in the middle of a merge, or by having done > something like "git pull -n" or similar that does everything _but_ > commit), then git commit will say "nothing to do".
Might it be a good idea to have "git-add" do the same as "git-update-index" on already tracked files? That could be easily taught as "you must explicitly _add_ files to your next commit" and whether the file is already tracked or not wouldn't matter. This would help newbies actually getting used the index without mentioning the dreaded word "index" at all.
Right now git-add on an already tracked file does nothing, not even a message to say it did nothing.