git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Implicit stashes
@ 2010-06-30  2:48 John Tapsell
  2010-06-30  2:56 ` Joshua Jensen
  2010-06-30  5:13 ` Dangers of reset --hard (Re: Implicit stashes) Jonathan Nieder
  0 siblings, 2 replies; 8+ messages in thread
From: John Tapsell @ 2010-06-30  2:48 UTC (permalink / raw)
  To: Git List

Hi,

  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}

John

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-06-30 16:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30  2:48 Implicit stashes John Tapsell
2010-06-30  2:56 ` Joshua Jensen
2010-06-30  3:05   ` John Tapsell
2010-06-30  5:57     ` Sverre Rabbelier
2010-06-30 11:27       ` Alex
2010-06-30  5:13 ` Dangers of reset --hard (Re: Implicit stashes) Jonathan Nieder
2010-06-30  8:19   ` Will Palmer
2010-06-30 16:12     ` Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).