Re: How to commit removed file?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jan 6, 2007, 01:57 UTC
- Message-ID
- <7vzm8wapdv.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <87lkklgc8v.wl%cworth@cworth.org>
Carl Worth <cworth@cworth.org> writes:
Show 8 quoted lines
> On Tue, 02 Jan 2007 13:40:41 -0800, Junio C Hamano wrote: >> Personally I never saw the point of having "git rm". Maybe we >> should remove it to prevent this confusion from happening. > > The one place where it's really "necessary", (as opposed to some users > just expecting it to be there), is to "undo" a git-add, (and I mean a > git-add that actually adds a new path to the index, not one of these > newfangled git-adds that simply updates content for an existing path).
"git reset" (i.e. --mixed) is the way to revert the index back to HEAD and start over.