Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View stashed file contents without diff visualization

Tags:

git

From git-stash docs on show option (emphasis mine).

Show the changes recorded in the stash entry as a diff between the stashed contents and the commit back when the stash entry was first created.

Is it possible to view the contents of a stash, not as a diff, but rather as raw file contents, in the same manner as git show my-branch:path/to/my/file would?

like image 875
1252748 Avatar asked Sep 15 '25 12:09

1252748


1 Answers

Try the command

git show stash@{0}:/path/to/my/file

This shows the contents of the file in file in stash@{0} not as a diff but as the full file.

like image 191
David Avatar answered Sep 18 '25 10:09

David