Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Range-Diff: Compare Commit Series

Create a disposable repository with a base commit and an old topic series of at least three commits. Record the old tip. Create a revised topic series from the same base in which one patch is rewritten, one patch is retained with a changed commit message or patch, and one new patch is added. Run the two explicit-range form, the three-revision form, and the symmetric form. Identify each `=`, `!`, `<`, and `>` relationship in the output. Then run `--creation-factor`, `--left-only`, `--right-only`, `--no-dual-color`, and a path-restricted comparison. Explain which review question each command answers. Do not rebase, reset, or otherwise rewrite the series as part of the exercise.

Advanced ~6 min read

Challenge 1

Complete the Git command to compare two commit series.

bash Your answer
git 

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to compare two commit series.

bash Your answer
git  <old-base>..<old-tip> <new-base>..<new-tip>

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to compare two commit series.

bash Your answer
git  OLD_BASE..OLD_TIP NEW_BASE..NEW_TIP

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to compare two commit series.

bash Your answer
git  OLD_TIP...NEW_TIP

Press Ctrl⌘Enter to check your answer