10

I'm trying to do a "git stash pop" with a binary file. It results in a merge conflict. I just want to pull what's in the stash off and overwrite what's in the working directory. What is the easiest way to do that?

Mr Mikkél
  • 2,577
  • 4
  • 34
  • 52
  • 1
    Not sure if it's a duplicate exactly, but [this answer might help you](http://stackoverflow.com/a/3733698/2812842) – scrowler Apr 30 '15 at 22:58
  • Hmm... well, the working branch (or the file in question) isn't dirty. It was just changed in another branch before being merged in, and the file in the stash doesn't have the merged in changes. – Mr Mikkél Apr 30 '15 at 23:09
  • It's a suggested method for using a `--force` approach to `git stash pop` - give it a try anyway :) – scrowler Apr 30 '15 at 23:14

1 Answers1

20

To restore all files to their stashed version:

$ git checkout stash -- .
Alex Pan
  • 4,341
  • 8
  • 34
  • 45