3

I've been working on a branch in git, I then stashed some stuff. After some switching around branches I got back to my initial branch, made some new changes, stashed them, and then realised I wanted to go back to the changes I made before I stashed the first time.

So my question; is there a history of stashes, and if so, how do I get back to one of these?

kramer65
  • 50,427
  • 120
  • 308
  • 488
  • 1
    possible duplicate of [git stash apply version](http://stackoverflow.com/questions/1910082/git-stash-apply-version) – user229044 Feb 19 '14 at 15:08

1 Answers1

6

Use git stash list and choose appropriate stash in git stash apply <stash-id>

user3159253
  • 16,836
  • 3
  • 30
  • 56
  • 3
    To show stash changes use `git stash show ` and add `-p` to show the changed lines in the stash. `` would be in the format `stash@{1}` or `stash@{2}` etc – Mohammad AbuShady Feb 19 '14 at 15:10