0
0
Gitdevops~10 mins

Creating named stashes in Git - Interactive Practice

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

Complete the command to create a stash with a custom name.

Git
git stash save [1]
Drag options to blanks, or click blank then click option'
A-m "My stash"
B"My stash"
C--name "My stash"
D-n "My stash"
Attempts:
3 left
💡 Hint
Common Mistakes
Using flags like -m or --name which are not valid for git stash save.
Not using quotes around the stash message.
2fill in blank
medium

Complete the command to create a stash with a message using the modern syntax.

Git
git stash push [1]
Drag options to blanks, or click blank then click option'
A-m "Work in progress"
B--message "Work in progress"
C-msg "Work in progress"
D-name "Work in progress"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect flags like --message or -name which git stash push does not recognize.
Omitting the message flag entirely.
3fill in blank
hard

Fix the error in the command to create a named stash with git stash push.

Git
git stash push [1] "Fix bug"
Drag options to blanks, or click blank then click option'
A-msg
B--name
C-m
D-n
Attempts:
3 left
💡 Hint
Common Mistakes
Using -msg instead of -m.
Using --name or -n which are not valid flags for git stash push.
4fill in blank
hard

Fill both blanks to create a stash with a message and include untracked files.

Git
git stash push [1] [2]
Drag options to blanks, or click blank then click option'
A-m "Update README"
B-u
C--include-untracked
D-a
Attempts:
3 left
💡 Hint
Common Mistakes
Using -u instead of --include-untracked which only stashes untracked files but not ignored files.
Omitting the message or untracked files flag.
5fill in blank
hard

Fill all three blanks to create a stash with a message, include all files, and keep index.

Git
git stash push [1] [2] [3]
Drag options to blanks, or click blank then click option'
A-m "Refactor code"
B-a
C--keep-index
D-u
Attempts:
3 left
💡 Hint
Common Mistakes
Using -u instead of -a to include ignored files.
Forgetting to keep the index when needed.