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
Written by Daniel Serodio
Related protips
3 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#