2

I don't want to see the diff, I just want to see a nice list of files in a stash. I'm having trouble finding that. I am not seeing it in here, and I'm not seeing it here.

ScottyBlades
  • 12,189
  • 5
  • 77
  • 85

2 Answers2

2

Found it:

git diff --name-only stash@{0}^ stash@{0}

This will show the files in stash@{0}.

ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
1

Pass --name-only to git stash show to show the most recent stash:

git stash show --name-only

To show stashes other than the most recent, pass stash@{N} where N is the stash number desired (0 being the most recent, also git stash list to list all stashes), e.g.:

git stash show --name-only stash@{0}

Many arguments that git diff accepts should be accepted by git stash show; sadly this isn’t very obvious, and --name-only isn’t documented under man git-stash.

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214