SEMIPOL
  • Blog
  • Software
  • Vita
  • Photography

Applying the Changes of a Single File from a Git Stash

June 18, 2014

Tags

  • git (4)

In order to apply only changes for a selected file from the git stash you can use the following command line (bash):

1
git diff stash@\{0\}^1 stash@\{0\} -- path/to/your/file | git apply

Based on the Stackoverflow question: How would I extract a single file (or changes to a file) from a git stash?

  • Archive
  • Tags
  • Contact
  • Privacy / Datenschutzerklärung
  • Atom Feed