0
0
Gitdevops~5 mins

git stash apply vs pop - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What does git stash apply do?

git stash apply takes the changes saved in the stash and applies them to your current working directory, but it keeps the stash entry saved for later use.

Click to reveal answer
beginner
What is the main difference between git stash apply and git stash pop?

git stash apply applies the stash but keeps it saved, while git stash pop applies the stash and then removes it from the stash list.

Click to reveal answer
beginner
When would you use git stash pop instead of git stash apply?

You use git stash pop when you want to apply the changes and also clean up by removing the stash entry immediately.

Click to reveal answer
intermediate
What happens if there is a conflict when you run git stash apply or git stash pop?

Git will show conflict markers in the files. You must resolve conflicts manually before continuing.

Click to reveal answer
beginner
How can you see the list of all stashed changes?

Use git stash list to see all saved stashes with their names and descriptions.

Click to reveal answer
What does git stash pop do?
ADeletes all stashes without applying
BApplies the stash and removes it from the stash list
CApplies the stash but keeps it saved
DCreates a new stash
Which command keeps the stash after applying changes?
Agit stash apply
Bgit stash clear
Cgit stash drop
Dgit stash pop
If you want to apply stash changes but keep them for later, which command do you use?
Agit stash pop
Bgit stash drop
Cgit stash list
Dgit stash apply
What should you do if conflicts appear after applying a stash?
AManually resolve conflicts
BDelete the conflicting files
CIgnore and continue
DRun <code>git stash clear</code>
How do you view all saved stashes?
Agit stash apply
Bgit stash show
Cgit stash list
Dgit stash pop
Explain the difference between git stash apply and git stash pop.
Think about whether the stash remains after applying.
You got /3 concepts.
    Describe what happens when there is a conflict after applying a stash and how to handle it.
    Conflicts are like disagreements in changes that need fixing.
    You got /3 concepts.