Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Cherry-Pick: Applying Selected Commits to Another History

Create a disposable repository with main and maintenance branches. Make two independent commits on main, switch to maintenance, cherry-pick only one selected commit, record source and destination IDs, then use `--no-commit` for another change and create your own combined commit. In a separate disposable repository, create a conflict, inspect `CHERRY_PICK_HEAD`, and abort.

Advanced ~6 min read

Challenge 1

Complete the Git command to use the `git cherry-pick` operation.

bash Your answer
git  <selected-commit>

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to use the `git cherry-pick` operation.

bash Your answer
git  --no-commit <another-commit>

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to use the `git cherry-pick` operation.

bash Your answer
git  <commit>

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to use the `git cherry-pick` operation.

bash Your answer
git  <source-commit>

Press Ctrl⌘Enter to check your answer