Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Git Version Control) expand_more
Git Version Control / Selective Workflows

Stash selected paths

Learn Stash selected paths in Git Version Control with a dedicated explanation, a topic-specific example, edge guidance, and a mastery check.

12 min read • Intermediate
git-034.sh
shell
rm -rf /tmp/sx-git-34; git init -q /tmp/sx-git-34; cd /tmp/sx-git-34; git config user.name Syntaxis; git config user.email lesson@example.test; printf "base\n" > app.txt; git add app.txt; git commit -qm base; echo a > a.txt; echo b > b.txt; git add .; git commit -qm files; echo aa >> a.txt; echo bb >> b.txt; git stash push -m only-a -- a.txt
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content