AZ-400 · Question #471
AZ-400 Question #471: Real Exam Question with Answer & Explanation
The correct answer is B: git clone --filter=blob:none [email protected]:v3/org/Project1/repo1. Explanation Option B (--filter=blob:none) performs a blobless clone, which downloads all commits and tree objects (preserving full commit history for any directory including /src) but skips downloading file contents (blobs) until they are needed - dramatically reducing clone time
Question
You have a 1-TB Azure Repos repository named repo1. You need to clone repo1. The solution must meet the following requirements: - You must be able to search the commit history of the /src directory - The amount of time it takes to clone the repository must be minimized Which command should you run?
Options
- Agit clone --depth-1 [email protected]:v3/org/Project1/repo1
- Bgit clone --filter=blob:none [email protected]:v3/org/Project1/repo1
- Cgit clone [email protected]:v3/org/Project1/repo1
- Dgit clone --filter=true:0 [email protected]:v3/org/Project1/repo1
Explanation
Explanation
Option B (--filter=blob:none) performs a blobless clone, which downloads all commits and tree objects (preserving full commit history for any directory including /src) but skips downloading file contents (blobs) until they are needed - dramatically reducing clone time for large repositories like a 1 TB repo.
Why the distractors are wrong:
- Option A (
--depth=1) creates a shallow clone with only the most recent commit snapshot, which breaks commit history search - violating the first requirement. - Option C is a full clone with no optimization flags, which would download the entire 1 TB repository and fails to minimize clone time.
- Option D (
--filter=true:0) is not a valid Git filter syntax and would produce an error.
Memory Tip 💡
Think of --filter=blob:none as "give me the map (history/commits), but not the cargo (file contents)" - you can still navigate the full history of /src, but heavy file data is only fetched on demand, keeping the initial clone fast. Whenever an exam question requires both full history AND speed, reach for --filter=blob:none.
Topics
Community Discussion
No community discussion yet for this question.