We also faced the same issue. So, here is how we recovered the lost changes:
-
Go back to branch B.
git checkout B
-
Use
git reflogoption to mange reflog information.git reflog –all
Output:
f332d5c refs/stash@{0}: WIP on B: aa1d0c1 xyz commit message
-
Now, switch to branch A using
git checkout A -
Finally, to recover your lost changes.
git stash apply f332d5c