AlgoMaster Logo

Cherry-Picking - Quiz

1 min readUpdated December 2, 2025
Listen to this chapter
Unlock Audio

Cherry-Picking Exercises

29 quizzes

1
Code Completion

Apply a specific commit from another branch onto the branch you currently have checked out

shell
1
git 3f9c2a1

Click an option to fill the blank:

2
Code Completion

Start a cherry-pick sequence that stops before creating a commit so you can edit the changes

shell
1
git cherry-pick 7a1b2c3

Click an option to fill the blank:

3
Code Completion

Abort an in-progress cherry-pick that produced conflicts you no longer want to resolve

shell
1
git cherry-pick

Click an option to fill the blank:

4
Code Completion

Skip the current conflicting commit in an ongoing cherry-pick sequence and continue with the next one

shell
1
git cherry-pick

Click an option to fill the blank:

5
Multiple Choice

Why might a team prefer cherry-picking a bugfix from a feature branch onto main instead of merging the whole branch?

6
Multiple Choice

What happens to the commit hash when you cherry-pick a commit onto another branch?

7
Multiple Choice

During git cherry-pick, what triggers a conflict that you must resolve manually?

8
Multiple Choice

Which syntax correctly cherry-picks a continuous range of commits from C through F (inclusive)?

9
Multiple Choice

When resolving a cherry-pick conflict, what should you do after editing the conflicted files and staging them?

10
Sequencing

Order the steps to cherry-pick a single bugfix commit from feature into main and finalize it.

Drag and drop to reorder, or use the arrows.

11
Sequencing

Order the steps to cherry-pick a range of commits from a feature branch onto release.

Drag and drop to reorder, or use the arrows.

12
Sequencing

Order the steps to recover from a failed cherry-pick you decide not to keep.

Drag and drop to reorder, or use the arrows.

13
Sequencing

Order the steps for resolving a conflict during a multi-commit cherry-pick sequence.

Drag and drop to reorder, or use the arrows.

14
Output Prediction

You are on branch main. What single line of output will this command produce?

1git branch --show-current
15
Output Prediction

You successfully cherry-picked one commit with hash 12ab3cd. What exact output line will Git print at the end?

1git cherry-pick 12ab3cd
16
Output Prediction

You are in the middle of a cherry-pick sequence with conflicts. What line will this command show?

1git status --short --branch | head -n 1
17
Output Prediction

You run a cherry-pick that causes a conflict. Immediately after, what single line does Git print to indicate the problem?

1git cherry-pick 3c4d5e6 || echo "conflict"
18
Bug Spotting

Find the incorrect command in this cherry-pick workflow for applying a bugfix from feature-login onto main.

Click on the line(s) that contain the bug.

shell
1
git checkout main
2
git pull origin main
3
git cherry-pick feature-login
4
git push origin main
19
Bug Spotting

Identify the incorrect command in this attempt to resolve a cherry-pick conflict.

Click on the line(s) that contain the bug.

shell
1
git cherry-pick a1b2c3d
2
# edit conflicted files
3
git add .
4
git cherry-pick --abort
5
git cherry-pick --continue
20
Bug Spotting

Spot the incorrect command in this attempt to cherry-pick a range of commits.

Click on the line(s) that contain the bug.

shell
1
git checkout release
2
git log feature
3
git cherry-pick C..F
4
git push origin release
21
Matching

Match each cherry-pick-related command with its description.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

22
Matching

Match each cherry-pick conflict marker or command to its meaning.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

23
Matching

Match each cherry-picking scenario to the most appropriate Git action.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

24
Fill in the Blanks

Complete the commands to resolve a cherry-pick conflict and finish applying the commit.

shell
1
git status
2
# edit files to resolve conflicts
3
git .
4
git cherry-pick

Click an option to fill blank 1:

25
Fill in the Blanks

Complete the commands to cherry-pick a single bugfix from feature into main.

shell
1
git checkout
2
git cherry-pick

Click an option to fill blank 1:

26
Fill in the Blanks

Complete the commands to cherry-pick a range of commits from a feature branch onto a release branch.

shell
1
git checkout
2
git cherry-pick ..

Click an option to fill blank 1:

27
Hotspot Selection

Click the line that shows the commit currently being cherry-picked.

Click on the line to select.

shell
1
On branch main
2
You are currently cherry-picking commit 3a4b5c6.
3
  (fix conflicts and run "git cherry-pick --continue")
4
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)
28
Hotspot Selection

Click the line that indicates Git is in the middle of a cherry-pick operation.

Click on the line to select.

shell
1
On branch main
2
Your branch is ahead of 'origin/main' by 1 commit.
3
  (use "git push" to publish your local commits)
4
You are currently cherry-picking commit 9f8e7d6.
29
Hotspot Selection

Click the line that shows there are unmerged paths due to a cherry-pick conflict.

Click on the line to select.

shell
1
On branch feature
2
You are currently cherry-picking commit 1a2b3c4.
3
Unmerged paths:
4
  (use "git add <file>..." to mark resolution)