On Sun, Mar 03, 2013 at 11:56:10AM -0800, Tom Green 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
[...]

> Thanks, Konstantin. How do I go about merging that one file in my stash 
> into my working directory so I can proceed?

Are you sure you *understand* the situation with your project?

I don't mean/want to offend you, but your original message gave me the
impression you have little to no clue about what's going on and why
`git stash apply` refuses to work.  From the error message, I gathered
that your index most probably contains unmerged entries which means
you're in the middle of a merge which had conflicts (which you did not
yet solve).  To know for sure, I proposed to check the output of the
`git status` command, to see if you really have merge conflict in
the "TECHNOTE/git.TXT" and other affected files.

Now you tell nothing about what you did about it and ask me how to merge
a file in a stash into the working directory.  This unfortunately makes
me think I probably failed to convey my idea about the situation or you
failed to understand it.

So let's recap:
1) It appears to me that you're in the middle of a faulty merge
   operation.  This means you have unresloved conflicts in certain
   files.
2) `git stash pop` fails to update those files.
3) So you have to first deal with the merge and make sure your work
   tree is clean (has no local modifications) and matches the index.
4) To verify (1) holds true, you should start with inspecting
   what `git status` tells you.

I understand it's possible that you're very well aware about what state
your project in, and you just did not tell me.  But I want to be on the
safe side to not damage your data so please bear with me and consider
really providing answers to what was asked or we'll go round in circles.

And no, AFAIK, there's no way to merge a stash entry into the work tree,
let alone a single file from it.  Well, the truth is, I can imagine a
couple of ways to go about doing this but let's first deal with what I
think is the real problem.

-- 
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