How To See Git Stash Changes
March 24, 2020
Show most recent stash's contents
If you want jus the most recent changes then run the following command:
1.git stash show -p
Show specific stash contents
To get the contents of a specific stash in your stash history you need to pass in the reference value for that particular stash.
1.git stash show {stashRef} -p
You can see the stashRefs, along with all the stashes you currently have, by using the following command:
1.git stash list
For example,
1.❯ git stash list2.stash@{0}: WIP on master: 8382b08 change menu icon to close3.stash@{1}: WIP on visualizing-apple: 0d32414 first draft of visualizing apple
The stashRef value is stored in the @{stashRef}, in this case, 0 and 1. If we want to see the contents of the second stash we would type:
1.git stash show 1 -p
This will give you a diff of changes for that stash:
1.diff --git a/package-lock.json b/package-lock.json2.index 3eb2707..71465d5 1006443.--- a/package-lock.json4.+++ b/package-lock.json5.@@ -14170,6 +14170,11 @@6. "scheduler": "^0.18.0"7. }8. },9.+ "react-render-to-json": {10.+ "version": "0.0.6",11.+ "resolved": "https://registry.npmjs.org/react-render-to-json/-/react-render-to-json-0.0.6.tgz",12.+ "integrity": "sha512-fMfqnDjO2HHeg3k4dVierDxVQUymaTfWlsL9pfkSNHpXhGey1J/T8CDsVhN+xjswFYSM30zL0dLBiGHqGoAWWg=="13.+ },
More Git Snippets
Popular Articles
I Can't Believe It's Not CSS: Styling Websites with SQL
Style websites using SQL instead of CSS. Database migrations for your styles. Because CSS is the wrong kind of declarative.

How I Built an Oreo Generator with 1.1 Sextillion Combinations
Building a web app that generates 1,140,145,285,551,550,231,122 possible Oreo flavor combinations using NestJS and TypeScript.

AI Model Names Are The Worst (tier list)
A comprehensive ranking of every major AI model name, from the elegant to the unhinged. Because apparently naming things is the hardest problem in AI.