0
0
Gitdevops~10 mins

git stash apply vs pop - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to save your current changes to a stash.

Git
git stash [1]
Drag options to blanks, or click blank then click option'
Aapply
Bsave
Cpush
Dpop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' or 'pop' instead of the command to save changes.
Using 'save' which is deprecated.
2fill in blank
medium

Complete the command to reapply the latest stash without removing it.

Git
git stash [1]
Drag options to blanks, or click blank then click option'
Aapply
Bpush
Cpop
Ddrop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pop' which removes the stash after applying.
Using 'drop' which deletes the stash without applying.
3fill in blank
hard

Fix the error in the command to reapply and remove the latest stash.

Git
git stash [1]
Drag options to blanks, or click blank then click option'
Aapply
Bsave
Cpush
Dpop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' which does not remove the stash.
Using 'push' or 'save' which are for saving changes.
4fill in blank
hard

Fill both blanks to complete the command that shows the stash list and then removes the latest stash.

Git
git stash [1] && git stash [2]
Drag options to blanks, or click blank then click option'
Alist
Bpop
Capply
Ddrop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'pop' which does not remove the stash.
Using 'drop' first which deletes stash without applying.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps stash names to their index if the index is less than 3.

Git
stash_dict = [1]: [2] for [3] in range(5) if [2] < 3}
Drag options to blanks, or click blank then click option'
A"stash_" + str(i)
Bi
Dstash
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same variable name for key and loop variable incorrectly.
Not converting index to string for key.