Skip to content
Foxipa
Exercises

Git

Git Code Completion Exercises

Complete focused Git command forms drawn from the Git learning lessons.

Interactive exercises that help you practice, check your understanding, and find what to revisit.

Start here

Complete the Git commands: Git Mailbox Patch Series: Apply with git am

Create a disposable source repository with a base commit followed by two ordinary commits. Generate a mailbox series with `git format-patch -o patches BASE..HEAD`. In a separate target repository at the same base, run `git am patches/*.patch` and prove that two commits were created. Compare the resulting author and committer identities and commit messages with the source commits. Then repeat using `git am < series.mbox`. Create a deliberately conflicting target commit and apply a patch that cannot apply cleanly. Use `git am --show-current-patch=diff`, resolve the conflict, stage the resolution, and finish with `git am --continue`. In a second run, use `git am --skip` to omit one patch from a multi-patch series. In a final run, start an `am` operation and use `git am --abort`; prove that the branch and working tree return to their pre-operation state. Explain why `git apply` is not the correct command for reconstructing commits from the mailbox.

Explore the collection

Exercises

Browse the complete collection and choose the resource that matches what you want to practice or understand.