anxp0g
Last Updated: November 23, 2016
·
34.82K
· dserodio

Force a "git stash pop"

git

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

11578

This works. thanks sir.

over 1 year ago ·
15626

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

over 1 year ago ·
20801

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

over 1 year ago ·