Advanced Git & Version Control
Q88 / 100

What is the purpose of Git's "packed-refs" file, and how does it relate to loose refs in ".git/refs/"?

Correct! Well done.

Incorrect.

The correct answer is A) Branch and tag refs are normally stored as small "loose" files under ".git/refs/", but as a repo accumulates many refs, Git periodically consolidates them into one ".git/packed-refs" file — a ref can be loose (taking precedence), packed, or both

A

Correct Answer

Branch and tag refs are normally stored as small "loose" files under ".git/refs/", but as a repo accumulates many refs, Git periodically consolidates them into one ".git/packed-refs" file — a ref can be loose (taking precedence), packed, or both

Explanation

This optimization avoids the filesystem overhead of having thousands of tiny individual files for repositories with many branches and tags, while still allowing newly created/updated refs to exist as loose files until the next repacking.

Progress
88/100