Recall & Review
beginner
What does
git cherry-pick do?It copies the changes introduced by a commit from one branch and applies them onto the current branch.
Click to reveal answer
intermediate
How do you cherry-pick multiple commits in one command?
Use
git cherry-pick commit1 commit2 commit3 listing all commit hashes separated by spaces.Click to reveal answer
intermediate
What is a common problem when cherry-picking multiple commits?
Conflicts can happen if the commits change the same lines as the current branch. You must resolve conflicts manually.
Click to reveal answer
intermediate
How can you cherry-pick a range of commits?
Use
git cherry-pick start_commit^..end_commit to pick all commits from start_commit to end_commit inclusive.Click to reveal answer
beginner
What should you do if a cherry-pick results in conflicts?
Resolve the conflicts in files, then run
git cherry-pick --continue to finish applying the commits.Click to reveal answer
Which command cherry-picks commits
a1b2c3 and d4e5f6 onto the current branch?✗ Incorrect
To cherry-pick multiple commits, list each commit hash separated by spaces.
How do you cherry-pick all commits from
abc123 to def456 inclusive?✗ Incorrect
Use
start_commit^..end_commit to include the start commit in the range.What should you do after resolving conflicts during a cherry-pick?
✗ Incorrect
After fixing conflicts, run
git cherry-pick --continue to finish.If you want to cancel a cherry-pick in progress, which command do you use?
✗ Incorrect
Use
git cherry-pick --abort to stop and undo the cherry-pick.Cherry-picking is best described as:
✗ Incorrect
Cherry-picking copies specific commits, not whole branches.
Explain how to cherry-pick multiple commits and handle conflicts if they arise.
Think about the steps from selecting commits to finishing the process.
You got /4 concepts.
Describe the difference between cherry-picking a range of commits and cherry-picking individual commits.
Consider how you specify commits in the command.
You got /4 concepts.