git stash specific files code example

Example 1: git stash apply specific stash

git stash apply "stash@{n}"
or
git stash apply n

Example 2: git stash one file

git stash save -- just_my_file.txt

Example 3: git stash one file

$ git stash -- filename.ext

Example 4: git stash apply specific file

git diff stash^! -- path/to/relevant/file/in/stash.ext perhaps/another/file.ext > my.patch
git apply < my.patch

Example 5: git stash contnet

git stash show -p stash@{1}

Example 6: git stash changes to particular file

git stash push <path>