Reputation: 40673
The scenario:
git stash
and then checked out Branch B.git stash
on Branch B and then checked out Branch A.Here's where I screwed up
git stash apply
on Branch A thinking it was going to apply my stash from Branch A back.It didn't. It took the stashed files from Branch B and applied it to Branch A.
Is there any way to back out of this and get the changes I originally stashed while in Branch A? Or are they gone?
Upvotes: 1
Views: 128
Reputation: 21918
You can re-stash the changes you just applied (git stash
) then find in the stash list (git stash list
) the one you need, then git stash pop <stashRefYouSpottedEarlier>
to finish the process.
Upvotes: 1