2

I needed to push a quick fix for a bug, so I stashed the changes I was working on. After I finished the bug fix, I committed it, then pulled the changes from the repository, and then pushed my changes.

After this I ran git stash apply, which resulted in this message: CONFLICT (content): Merge conflict in foo.js

I resolved the conflict and staged my changes. However, when I try to run git stash apply again, I get the same conflict message again: CONFLICT (content): Merge conflict in foo.js

I'm not sure what to do--I'm clearly doing something wrong, but I have no idea what. Any help would be much appreciated!

1 Answer 1

7

You don't need to run git stash apply again. Because the stashed changes are already applied. You may even want to start using git stash pop at some point instead, so that the changes are removed from stash after they're applied.

Sign up to request clarification or add additional context in comments.

3 Comments

+1 for stash pop, which is indeed more appropriate than stash apply.
Ah, thanks. I am missing a file, which is what was throwing me off, but that may be due to other reasons... Would there be a reason why creating a new file and then calling stash would drop the file?
stash doesn't save untracked files, probably you dropped the file at some point when pulling the changes and doing whatever you've been doing.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.