Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k points)
I'd like to know if it is possible to extract a single file or diff of a file from a git stash without popping the stash changeset off.

Might anyone be able to provide some suggestions/ideas about this?

1 Answer

+1 vote
by (27.5k points)

In order to see the whole file: 

git show stash@{0}:<filename>

In order to see the diff: 

git diff stash@{0}^1 stash@{0} -- <filename>

Related questions

+9 votes
2 answers
+6 votes
2 answers
0 votes
1 answer
asked Aug 2, 2019 in DevOps and Agile by Han Zhyang (19.7k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...