git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Iván V." <elterrible@ivanyvenian.com>
Cc: git@vger.kernel.org
Subject: Re: Newbie question: Is it possible to undo a stash?
Date: Wed, 14 May 2008 13:42:56 -0700 (PDT)	[thread overview]
Message-ID: <m3y76c4nxv.fsf@localhost.localdomain> (raw)
In-Reply-To: <509f40850805141256gce6ac1brf5ced6436f81dae8@mail.gmail.com>

"Iván V." <elterrible@ivanyvenian.com> writes:

> I just did a git stash, and then changed my mind and ran git apply,
> thinking that would get me back to where I was...

You meant "git stash apply" here, didn't you?
 
> Now I have lots of conflicting merges and files that came back from
> the dead (and some files seem lost)... I've been trying to go step by
> step to try to get the tree to where it was, but it's very
> complicated, so I was wondering if there is anything I can do to get
> my working tree exactly to where it was before I ran git stash...

To get your working tree and index to exact state as it was before
git-stash, you have first to bring current HEAD to the state it was
when you did the stash.  So if you changed branch, you have to change
it back; if you did any commits, you have to rewind (reset) it.

If the "base" state isn't the same as it was during "git stash", then
"git stash apply" would have to do a merge... which can fail...


P.S. Please provide with the exact (best if minimal) sequence of
commands, if you want for us to dianoze if there is a bug in git, or
user error.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-05-14 20:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14 19:56 Newbie question: Is it possible to undo a stash? Iván V.
2008-05-14 20:42 ` Jakub Narebski [this message]
2008-05-14 20:51 ` Jean-Luc Herren

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=m3y76c4nxv.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=elterrible@ivanyvenian.com \
    --cc=git@vger.kernel.org \
    /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).