From: Joshua Jensen <jjensen@workspacewhiz.com>
To: John Tapsell <johnflux@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Implicit stashes
Date: Tue, 29 Jun 2010 20:56:32 -0600 [thread overview]
Message-ID: <4C2AB260.8020108@workspacewhiz.com> (raw)
In-Reply-To: <AANLkTilTaQP6qARY1A495vm9HAvLVX_lqIQd1l3WIv7a@mail.gmail.com>
----- 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
next prev parent reply other threads:[~2010-06-30 2:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 2:48 Implicit stashes John Tapsell
2010-06-30 2:56 ` Joshua Jensen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2AB260.8020108@workspacewhiz.com \
--to=jjensen@workspacewhiz.com \
--cc=git@vger.kernel.org \
--cc=johnflux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).