0 votes
1 view
in Devops and Agile by (20k points)
edited by
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

0 votes
by (28.4k points)

Use the following command:

$ git checkout [email protected]{0} -- <filename>

Things to remember: 

A. Make sure that you put a space between the "--" and the file name parameter

B. Replace zero(0) with your specific stash number. 

In order to see the stash list, use the following command:

$ git stash list

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...