clean changes from accidently git stash pop
If you accidently do a $ git stash pop
and you do want to throw away the changes made by this, but keep all uncommitted changes, do this:
You should have the stash sha from your pop command:
Dropped refs/stash@{0} (415b859aacd665d2c3988c3538ac003e1f371d79)
Now you can do
$ git diff 415b859aacd665d2c3988c3538ac003e1f371d79^! | patch -p1 -R
to remove those changes.
Written by Benjamin Knofe
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Patch
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#