Search code examples
gitgit-stash

git diff for a single file in stash


I know from this answer how to show the diff against a stash.

git stash show -p stash@{1}

But how can I show the diff to a specific file from a stash?


Solution

  • You can use the diff command with a path:

    git diff stash@{1} -- <path>