Day 31: Git Stash

Опубликовано: 08 Июнь 2026
на канале: Otter Tech
19
0

📦 Day 31: Git Stash | 100 Days of DevOps

Welcome to Day 31 of the 100 Days of DevOps series! In this lab, you’ll learn how to work with Git Stash, a powerful feature that allows you to temporarily save changes without committing them.

The Nautilus development team previously stashed some in-progress work and now wants to restore a specific stash entry and continue working on it.

📌 Lab Objective:
Restore a specific stash, commit the changes, and push them to the remote repository.

🛠️ Task Requirements:

Repository path: /usr/src/kodekloudrepos/demo
Restore stash: stash@{1}
Commit restored changes
Push to origin

💻 Step-by-Step Commands:

Navigate to repository
cd /usr/src/kodekloudrepos/demo
Check available stashes
git stash list
Apply the specific stash
git stash apply stash@{1}
Verify changes
git status
Stage changes
git add .
Commit changes
git commit -m "restored stashed changes"
Push to remote
git push origin master

✅ Expected Outcome:

Stash stash@{1} successfully restored
Changes committed to repository
Updates pushed to remote origin

📚 What You’ll Learn in This Video:

What Git Stash is and why it’s used
Viewing and managing stashes
Restoring specific stash entries
Applying vs popping stashes
Continuing work after stash recovery
Real-world DevOps workflows

🌟 Why This Lab Matters:
Git Stash helps developers manage unfinished work efficiently without polluting commit history. It’s especially useful when switching contexts or handling urgent tasks.

🎯 Series: 100 Days of DevOps
Keep building real-world DevOps skills with Git, Linux, Docker, Kubernetes, and Cloud.

🔔 Don’t forget to like, share, and subscribe for more tutorials from OtterTech!

#DevOps #Git #GitStash #VersionControl #OpenSource #SoftwareDevelopment #Nautilus #100DaysOfDevOps #OtterTech #Lab31