1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 15:18:01 +00:00
Files
til/git/grab-a-single-file-from-a-stash.md
2015-09-22 22:24:39 -05:00

465 B

Grab A Single File From A Stash

In git, you can reference a commit SHA or branch to checkout differing versions of files.

$ git checkout d3d2e38 -- README.md

In the same way, you can snag the version of a file as it existed in a stash. Just reference the relevant stash.

$ git checkout stash@{1} -- README.md

source