How would I extract a single file (or changes to a file) from a git stash?

前端 未结 9 1607
一生所求
一生所求 2020-11-28 00:14

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 prov

9条回答
  •  星月不相逢
    2020-11-28 00:45

    You can get the diff for a stash with "git show stash@{0}" (or whatever the number of the stash is; see "git stash list"). It's easy to extract the section of the diff for a single file.

提交回复
热议问题