I have two branches master and development. I stashed on master e.g.
git stash
git checkout development
Now, I was on development branch but by mistake I popped the stash
git stash pop
And now it shows conflicts. I reset the git using this:
git reset HEAD
But it is still showing conflicts. I need my stash back in master branch also. How can i fix this issue?
git reset HEADwon't touch the working tree, just the index. Effectively, it'll just unstage staged files becauseHEADis where your current branch is already anyway (that's the definition of HEAD).git reset --hard HEADwill fix the working tree to reflectHEAD.If a
git popdoesn't apply cleanly, the stash should have been kept.From man git-stash:
So just do: