0
0
Gitdevops~10 mins

git cherry-pick a single commit - 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 commit by its hash.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
AHEAD
Bbranch
Ccommit
D<commit-hash>
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of the actual commit hash.
Using 'branch' which is for branches, not commits.
Using 'HEAD' which refers to the latest commit on the current branch.
2fill in blank
medium

Complete the command to cherry-pick a commit and continue after a conflict.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
A--continue
B<commit-hash>
C--abort
D--skip
Attempts:
3 left
💡 Hint
Common Mistakes
Using --continue directly with cherry-pick without a commit hash.
Using --abort or --skip instead of the commit hash.
3fill in blank
hard

Fix the error in the cherry-pick command to apply a commit.

Git
git cherry-pick [1]
Drag options to blanks, or click blank then click option'
A<commit-hash>
Borigin
CHEAD~1
Dbranch-name
Attempts:
3 left
💡 Hint
Common Mistakes
Using a branch name instead of a commit hash.
Using remote names like 'origin' which are invalid here.
4fill in blank
hard

Fill both blanks to cherry-pick a commit and resolve conflicts by continuing.

Git
git cherry-pick [1] && git cherry-pick [2]
Drag options to blanks, or click blank then click option'
A<commit-hash>
B--continue
C--abort
DHEAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using --abort instead of --continue to finish cherry-pick.
Using HEAD instead of the commit hash for cherry-pick.
5fill in blank
hard

Fill all three blanks to cherry-pick a commit, resolve conflicts, and skip a commit.

Git
git cherry-pick [1] && git cherry-pick [2] && git cherry-pick [3]
Drag options to blanks, or click blank then click option'
A<commit-hash>
B--continue
C--skip
D--abort
Attempts:
3 left
💡 Hint
Common Mistakes
Using --abort instead of --skip to skip commits.
Not specifying the commit hash in the first command.