Stashing Specific Files in Git
📖 Scenario: You are working on a project with multiple files changed. You want to temporarily save changes from only some files without committing them. This helps you switch tasks without losing work.
🎯 Goal: Learn how to stash changes from specific files using Git commands.
📋 What You'll Learn
Create a Git repository with three files:
index.html, style.css, and script.js.Modify all three files.
Stash changes only from
style.css and script.js.Verify the stash contains only those files.
Show the remaining unstashed changes.
💡 Why This Matters
🌍 Real World
Developers often need to save work temporarily on some files to switch tasks without committing unfinished changes.
💼 Career
Knowing how to stash specific files helps manage work efficiently in real projects and is a common skill in software development roles.
Progress0 / 4 steps