Skip to content

Instantly share code, notes, and snippets.

@DevanB
Created November 14, 2018 16:25
Show Gist options
  • Save DevanB/2a09f9787985907c84778ea60b7679a3 to your computer and use it in GitHub Desktop.
Save DevanB/2a09f9787985907c84778ea60b7679a3 to your computer and use it in GitHub Desktop.

Pull file from a stash

git checkout stash [stash index] -- [filename]

Also interesting to know that when you do a git stash, git saves two commits: one for the state of the index, and one for the state of the working copy (which is a merge between the index and the original HEAD).

Created with 📕TILed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment