0
0
Gitdevops~5 mins

Why stashing saves work temporarily in Git - Quick Recap

Choose your learning style9 modes available
Recall & Review
beginner
What is 'git stash' used for?
It temporarily saves your uncommitted changes so you can work on something else without losing your current work.
Click to reveal answer
beginner
How does stashing help when switching branches?
Stashing saves your changes so you can switch branches without committing incomplete work, then apply the changes later.
Click to reveal answer
intermediate
What happens to your changes after you run 'git stash'?
Your changes are saved in a hidden stack and your working directory is cleaned to match the last commit.
Click to reveal answer
intermediate
Can you stash multiple sets of changes in Git?
Yes, Git allows multiple stashes saved in a stack, which you can apply or drop individually later.
Click to reveal answer
beginner
What command restores your stashed changes back to your working directory?
The command 'git stash apply' restores the most recent stash without removing it from the stash list.
Click to reveal answer
What does 'git stash' do?
ASaves uncommitted changes temporarily
BDeletes all changes permanently
CCommits changes to the repository
DCreates a new branch
After running 'git stash', what happens to your working directory?
AIt creates a new commit
BIt stays the same
CIt deletes the repository
DIt is cleaned to match the last commit
Which command restores stashed changes without removing them from the stash list?
Agit stash apply
Bgit stash drop
Cgit stash pop
Dgit stash save
Can you stash multiple sets of changes in Git?
AYes, but only two stashes
BNo, only one stash is allowed
CYes, multiple stashes are saved in a stack
DNo, stashing deletes previous stashes
Why would you use 'git stash' before switching branches?
ATo commit changes automatically
BTo save incomplete work temporarily and switch safely
CTo delete the branch
DTo merge branches
Explain how 'git stash' helps you manage unfinished work when you need to switch tasks quickly.
Think about saving your work without committing it.
You got /4 concepts.
    Describe the difference between 'git stash apply' and 'git stash pop'.
    One keeps the stash, the other removes it after restoring.
    You got /3 concepts.