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

前端 未结 9 1586
一生所求
一生所求 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条回答
  •  萌比男神i
    2020-11-28 00:42

    If you use git stash apply rather than git stash pop, it will apply the stash to your working tree but still keep the stash.

    With this done, you can add/commit the file that you want and then reset the remaining changes.

提交回复
热议问题