Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Bundle: Move Git History Offline

Create a disposable repository with three commits on `main` and create a tag named `cutoff` at the first commit. Create and verify a self-contained `backup.bundle`, list its advertised refs, and clone from it into a fresh directory. Then create `update.bundle` from `cutoff..main`. Verify it successfully in a recipient that already has the prerequisite history and demonstrate that verification fails in an unrelated empty repository. Fetch `update.bundle` into the prepared recipient by explicitly mapping its advertised `HEAD` to a remote-tracking ref, then prove that the destination ref points to the expected tip. Finally, run `git bundle unbundle` against a self-contained bundle in a disposable bare repository and record which objects become available and which refs are merely reported rather than created. Explain why this is different from `git fetch`.

Advanced ~6 min read

Challenge 1

Complete the Git command to create or inspect the repository bundle.

bash Your answer
git  unbundle

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to create or inspect the repository bundle.

bash Your answer
git  create backup.bundle --all

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to create or inspect the repository bundle.

bash Your answer
git  verify backup.bundle

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to create or inspect the repository bundle.

bash Your answer
git  list-heads backup.bundle

Press Ctrl⌘Enter to check your answer