0
0
Gitdevops~10 mins

Cherry-picking multiple commits in Git - Interactive Code Practice

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

Complete the command to cherry-pick a single commit by its hash.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
Amerge
Bcommit
Cbranch
Dabc1234
Attempts:
3 left
💡 Hint
Common Mistakes
Using a branch name instead of a commit hash.
Typing 'merge' instead of 'cherry-pick'.
2fill in blank
medium

Complete the command to cherry-pick a range of commits from abc1234 to def5678.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
Aabc1234..def5678
Babc1234-def5678
Cabc1234:def5678
Dabc1234,def5678
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash or colon instead of two dots.
Separating commits with a comma.
3fill in blank
hard

Fix the error in the command to cherry-pick multiple commits listed individually.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
Aabc1234 def5678 ghi9012
Babc1234,def5678,ghi9012
Cabc1234;def5678;ghi9012
Dabc1234-def5678-ghi9012
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas or semicolons to separate commit hashes.
Using dashes instead of spaces.
4fill in blank
hard

Fill both blanks to cherry-pick commits from abc1234 to def5678 and continue cherry-picking even if conflicts occur.

Git
git cherry-pick [1] --[2]
Drag options to blanks, or click blank then click option'
Aabc1234..def5678
Bcontinue
Cabort
Dskip
Attempts:
3 left
💡 Hint
Common Mistakes
Using --abort which cancels the cherry-pick.
Using --skip which skips the current commit.
5fill in blank
hard

Fill all three blanks to cherry-pick commits abc1234, def5678 individually and abort if conflicts occur.

Git
git cherry-pick [1] [2] || git cherry-pick --[3]
Drag options to blanks, or click blank then click option'
Aabc1234
Bdef5678
Cghi9012
Dabort
Attempts:
3 left
💡 Hint
Common Mistakes
Using ghi9012 as a commit hash in the last blank instead of an option.
Using continue instead of abort.