I can’t pop my stash because I merged a branch which apparently conflicts with my stash and now my stash is seemingly unable to be popped.
app.coffee: needs merge
unable to refresh index
Anyone know how to resolve this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, check
git status.As the OP mentions,
That is where
git statuswould mention that file as being "both modified"Solution: in this case, simply add and commit your local file.
Actually, just
git add -- yourFile, or (if you don’t want those changes)git reset -- yourFile(to unstage it) is enough to get past the error message.If you do not want to commit, just
git add yourFileis enough.You can then
git stashthe rest if you want.You can find a similar situation 4 days ago at the time of writing this answer (March 13th, 2012) with this post: "‘Pull is not possible because you have unmerged files’":
What you did was to fix the merge conflict (editing the right file, and committing it):
See "How do I fix merge conflicts in Git?"
What the blog post’s author did was:
I.e. aborting the current merge completely, allowing the
git stash popto be applied.See "Aborting a merge in Git".
Those are your two options.