From: Jonathan Nieder Date: Wed, 30 Jun 2010 05:13:26 GMT Subject: Dangers of reset --hard (Re: Implicit stashes) Message-ID: <20100630051326.GA17497@burratino> In-Reply-To: John Tapsell wrote: > $ git reset --hard > > I know this seems very explicit to delete changes, but I myself have > done this and accidentally lost changes. For example, I write a unit > test and don't commit it in on purpose because I know that it > currently fails and I want to test it against older versions. I > carefully git checkout older versions to find if the unit test fails, > then in stupidity reset back to origin/master .. Aside: I assume you already know about it, but still I cannot help but take the opportunity to advertise ‘git reset --keep’. I was added fairly recently (1.7.1 rc0) and I find myself annoyed when on machines without it because of almost exactly this use case. Stephan and Christian: thanks for writing it.