0
0
Gitdevops~10 mins

Why cherry-pick is useful in Git - Test Your Understanding

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

Complete the command to copy a specific commit from another branch.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
Arebase
Bcommit-hash
Cmerge
Dbranch-name
Attempts:
3 left
💡 Hint
Common Mistakes
Using a branch name instead of a commit hash.
Trying to cherry-pick without specifying a commit.
2fill in blank
medium

Complete the sentence: Cherry-pick is useful when you want to {{BLANK_1}} a commit without merging the whole branch.

Git
Cherry-pick is useful when you want to [1] a commit without merging the whole branch.
Drag options to blanks, or click blank then click option'
Acopy
Bdelete
Cignore
Drevert
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing cherry-pick with deleting or reverting commits.
3fill in blank
hard

Fix the error in the command to cherry-pick commit abc123.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
AHEAD
Bbranch-name
Cmerge
Dabc123
Attempts:
3 left
💡 Hint
Common Mistakes
Using branch names or HEAD instead of commit hash.
4fill in blank
hard

Fill both blanks to create a new branch and cherry-pick a commit.

Git
git checkout -b [1] && git cherry-pick [2]
Drag options to blanks, or click blank then click option'
Afeature-fix
Babc123
Cmaster
Ddevelop
Attempts:
3 left
💡 Hint
Common Mistakes
Using existing branch names instead of new branch name.
Using branch names instead of commit hash for cherry-pick.
5fill in blank
hard

Fill all three blanks to cherry-pick multiple commits in sequence.

Git
git cherry-pick [1] [2] [3]
Drag options to blanks, or click blank then click option'
Aabc123
Bdef456
C789ghi
Dmaster
Attempts:
3 left
💡 Hint
Common Mistakes
Including branch names instead of commit hashes.
Using fewer or more commits than blanks.