From: Joshua Jensen Date: Wed, 30 Jun 2010 02:56:32 GMT Subject: Re: Implicit stashes Message-ID: <4C2AB260.8020108@workspacewhiz.com> In-Reply-To: ----- Original Message ----- From: John Tapsell Date: 6/29/2010 8:48 PM > I was thinking that it would be nice if everything was undoable in > git. Currently there are some easily typed by irreversible commands > that I keep seeing people doing. > > For example: > > $ git checkout folder > > Now all changes that you just worked on are deleted, with no way of recovering. > > $ 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 .. > Anyway, I think a nice solution is to have a separate stash for > implicit stashes. Then irreversible commands would simply stash > before making the changes. > It would also be nice to add a 'git undo' which just undoes whatever > the last operation was - i.e unstash or reset to an earlier HEAD@{1} See this thread: http://kerneltrap.org/mailarchive/git/2009/5/20/2915 Josh