0
0
Gitdevops~5 mins

git stash to save changes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the git stash command do?
It temporarily saves your uncommitted changes so you can work on something else without committing them.
Click to reveal answer
beginner
How do you apply the most recent stash and remove it from the stash list?
Use git stash pop. It applies the changes and deletes the stash entry.
Click to reveal answer
beginner
What command lists all saved stashes?
Use git stash list to see all your saved stashes with their names.
Click to reveal answer
intermediate
How can you save changes with a custom message in git stash?
Use git stash push -m "your message" to add a description to your stash.
Click to reveal answer
intermediate
What happens if you run git stash apply instead of git stash pop?
git stash apply applies the changes but keeps the stash saved for later use.
Click to reveal answer
What is the main purpose of git stash?
ASave uncommitted changes temporarily
BCommit changes permanently
CDelete all changes
DCreate a new branch
Which command applies the stash and removes it from the stash list?
Agit stash apply
Bgit stash save
Cgit stash list
Dgit stash pop
How do you see all saved stashes?
Agit stash show
Bgit stash list
Cgit stash apply
Dgit stash drop
What does git stash apply do?
AApplies stash but keeps it saved
BApplies stash and deletes it
CDeletes stash without applying
DCreates a new stash
How can you add a message when saving a stash?
Agit stash apply "message"
Bgit stash pop "message"
Cgit stash push -m "message"
Dgit stash list "message"
Explain how you would temporarily save your work in progress using git stash and then continue working on it later.
Think about saving your work without committing and then bringing it back.
You got /4 concepts.
    Describe the difference between git stash apply and git stash pop.
    One removes the stash after applying, the other does not.
    You got /3 concepts.