Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Merge Continue and Abort: Completing or Abandoning an In-Progress Merge

Create a disposable repository with two diverging branches that conflict on one tracked path. Record the receiving and incoming tips before the merge. Start the merge and inspect the interrupted state. Then perform one complete laboratory run by resolving the conflict, staging the result, configuring a deterministic editor for the merge message, and running `git merge --continue`; prove the new HEAD has two parents and that the merge-in-progress state is gone. Perform a second independent run in which you start the conflict and run `git merge --abort`; prove the receiving branch returned to its pre-merge tip and the working tree matches that tip. Do not treat exit status alone as proof; inspect repository state and history. Success requires two independent proofs: the continuation run must produce a new two-parent merge commit and clear the interrupted merge state; the abort run must restore the receiving branch's pre-merge tip and clear the interrupted merge state without creating a merge commit.

Intermediate ~6 min read

Challenge 1

Complete the Git command to integrate the selected branch.

bash Your answer
git  --continue

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to integrate the selected branch.

bash Your answer
git  --abort

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to integrate the selected branch.

bash Your answer
git  feature

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to stage the path.

bash Your answer
git  conflict.txt

Press Ctrl⌘Enter to check your answer