From: Brandon Casey Date: Thu, 26 Jun 2008 15:13:27 GMT Subject: Re: why is git destructive by default? (i suggest it not be!) Message-ID: In-Reply-To: <20080625022610.GB20361@mit.edu> Theodore Tso wrote: > On Tue, Jun 24, 2008 at 04:07:57PM -0700, Junio C Hamano wrote: >>> Instead, I've just learned to be careful and my use of git reset >>> --hard is mainly for historical reasons. >> This makes it sound as if avoiding "reset --hard" is a good thing, but I >> do not understand why. > > Well, it was Brandon Casey who was asserting that git reset --hard was > evil, which I generally don't agree with. I definitely don't think 'reset --hard' is evil. I _do_ think it is somewhat of an advanced command. It should be used where it is appropriate. I think it is a misuse of the command if it is used in place of checkout, which I got the impression might be the case. You described resetting an integration branch, Junio does a similar thing with pu and these are both valid uses. This is what I was talking about when I said that usually when I use reset I don't care about the state of the branch I am resetting. I also agree there are many other valid uses for 'git reset --hard'. -brandon