Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.4k points)

I often put work away for later, then other stuff comes along, and a few weeks later, I want to inspect the stash, and find out what changes it would make if I applied it to working tree in its current state.

I know I can do a git diff on the stash, but this shows me all the differences between the working tree and the stash, whereas I'm just interested to know what the stash apply is going to change.

How can I do this?

1 Answer

0 votes
by (27.5k points)

In order to list the stashed modifications

$ git stash list

In order to show files changed in the last stash

$ git stash show

In order to view the content of the most recent stash, run

$ git stash show -p

In order to view the content of an arbitrary stash, run something like

$ git stash show -p [email protected]{1}

Related questions

0 votes
1 answer
0 votes
1 answer
+6 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Browse Categories

...