QuizzesGit Internals Deep Dive — Objects, Packfiles, GC — Concept Check
intermediate
git

Git Internals Deep Dive — Objects, Packfiles, GC — Concept Check

Questions on Git Internals Deep Dive — Objects, Packfiles, GC. Under the hood: how Git stores objects in loose and packed format, how the index works, how garbage collection reclaims space, and how remote protocols transfer data efficiently.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Git Internals Deep Dive — Objects, Packfiles, GC — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.Your Git repository has grown to several gigabytes, and you suspect large objects are causing bloat. Which command helps you identify these objects?

    • Agit gc --aggressive
    • Bgit ls-files --stage
    • Cgit count-objects -v
    • Dgit verify-pack -v .git/objects/pack/pack-abc123.idx
  2. 2.After running 'git gc', you notice that your repository size has decreased significantly. What primarily causes this reduction?

    • AOld commits are deleted permanently.
    • BThe index is cleared of all entries.
    • CLoose objects are packed into smaller, efficient packfiles.
    • DThe working directory is cleaned of untracked files.
  3. 3.You attempt to push changes to a remote repository and receive an error about missing objects. What is the likely cause?

    • AThe remote repository is out of disk space.
    • BYour local repository has uncommitted changes.
    • CThe network connection is unstable.
    • DThe remote is missing objects that your local branch has.
  4. 4.During a merge, you see multiple stages for a file in the index. What does this indicate?

    • AThe file has been deleted from the working directory.
    • BThe file is ignored by .gitignore.
    • CThe file is untracked by Git.
    • DThere are unresolved conflicts in the file.
  5. 5.You run 'git status' and it executes quickly. What internal mechanism allows for this speed?

    • AGit stores only differences between commits.
    • BGit compresses the working directory files.
    • CGit uses multithreading to speed up operations.
    • DThe index caches the state of the working directory.
  6. 6.A developer believes that 'git push' sends all objects to the remote every time. Why is this incorrect?

    • A'git push' only updates branch references without sending objects.
    • B'git push' sends only objects that the remote does not have, packed into a packfile.
    • C'git push' sends only the latest commit, not all objects.
    • D'git push' uses a delta compression algorithm to send changes.
  7. 7.You notice that 'git gc' is running automatically. What triggers this behavior?

    • AA new branch is created.
    • BA threshold of loose objects is reached.
    • CThe repository is cloned.
    • DThe index is updated.
  8. 8.Which of the following commands updates the index with changes from the working directory?

    • Agit checkout
    • Bgit add
    • Cgit push
    • Dgit commit