On Sun, 3 Mar 2013 09:27:03 -0800 (PST)
Tom Green <tomgreen1...@gmail.com> wrote:

> I did a GIT STASH (working in Windows command line). Now I can't
> restore from it
> I get the message:
>     TECHNOTE/git.TXT: needs merge
>     unable to refresh index
> I tried commiting that file and I tried deleting it, but I still get
> the same problem. 
> I really don't care about that particular file, but there are a ton
> of others I need to restore, but I don't know how.
> I tried a 
>     GIT CHECKOUT 0000000000000000000000000000000000000001 --<filename>
> but that didn't work.
> GITK shows me a STASH entry with most of my stuff as well, but I
> can't seem to get anything from it either.

First things first: when in doubt, always start from inspecting the
output of `git status` -- does it mark the problematic files as
needing a merge?  If so, then supposedly your work tree and the index
are in the state of an incomplete (thought to be abandoned?) merge.
In this case, what `git stash apply` tells you should be dealt with
*before* trying to apply the stash -- either by actually resolving the
pending unmerged paths or by resetting the tree to some previous
state (typically, to the first parent of the unhappy merge).

An alternative (sideways) approach to this problem is to create a
branch out of your stash entry (see the `git stash` manual page) and
then trying to work from there.  But this is more like sweeping the
problem under the rug.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to