Last Updated: July 01, 2020
·
70.16K
· dserodio

Force a "git stash pop"

git stash pop will refuse to run if you have unstaged changes that would be overwritten by this operation, and for some reason, there's no --force option for this. You can achieve the desired effect with:

git stash show -p | git apply && git stash drop

Source: http://stackoverflow.com/a/3733698/31493

3 Responses
Add your response

This works. thanks sir.

over 1 year ago ·

git stash apply && git stash drop does this as well.

over 1 year ago ·

@calebthompson simple git stash apply refuses with the same warning as pop in case of conflicts

over 1 year ago ·