Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From
Boaz Harrosh <bharrosh@panasas.com>
- Date
- Jun 25, 2008, 09:59 UTC
- Message-ID
- <4862171F.6070505@panasas.com>
- In-Reply-To
- <7vr6al3m24.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 20 quoted lines
> Boaz Harrosh <bharrosh@panasas.com> writes: > >> Junio C Hamano wrote: >> >>> "reset --hard" has *ALWAYS* meant to be destructive --- discarding >>> potential local cruft is the whole point of the operation. >> I was under the impression that --hard means working-directory-also >> as opposed to tree-and-index-only. Nothing to do with >> destructive-discarding. > > Then you should revise your impression, as it is simply *WRONG*. When > I say something about history of git, I know what I am talking about ;-) > > Reset has been about nuking local changes from the very beginning. That > is why it removes MERGE_HEAD, rr-cache/MERGE_RR as well as removing > conflicted stages in the index and reverts local changes from the worktree. > > It is "my worktree state is a mess, and I cannot even describe nor care > which paths are dirty --- just get rid of the local changes so that I can > start working cleanly from a checkout of HEAD".
OK Thanks, I see.
I have made myself that git-move-head script that uses checkouts and renames so I guess I'm happy. I used to use the --hard as a shortcut.
Boaz