nerdexam
Microsoft

AZ-400 · Question #480

Drag and Drop Question You have a large repository named Repo1 that contains a directory named directory1. You plan to modify files in directory1. You need to create a clone of Repo1. The solution mus

The correct answer is git fetch; scalar clone; git sparse-checkout. The correct script uses 'scalar clone' to perform an optimized partial clone of the large repository (minimizing initial data transfer), then 'git fetch' to retrieve the necessary objects, and finally 'git sparse-checkout' to limit the working directory to only 'directory1' - ens

Submitted by thandi_sa· Mar 6, 2026Configure and manage source control - specifically optimizing repository cloning and checkout strategies for large repositories using Scalar and sparse-checkout in Azure DevOps / Git environments.

Question

Drag and Drop Question You have a large repository named Repo1 that contains a directory named directory1. You plan to modify files in directory1. You need to create a clone of Repo1. The solution must minimize the amount of transferred data. How should you complete the script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Exhibit

AZ-400 question #480 exhibit

Answer Area

Drag items

git clonegit fetchgit sparse-checkoutgit worktreescalar clonescalar run

Correct arrangement

  • git fetch
  • scalar clone
  • git sparse-checkout

Explanation

The correct script uses 'scalar clone' to perform an optimized partial clone of the large repository (minimizing initial data transfer), then 'git fetch' to retrieve the necessary objects, and finally 'git sparse-checkout' to limit the working directory to only 'directory1' - ensuring only the required files and history are transferred and checked out. Scalar is specifically designed for large repositories and enables features like partial clone and sparse-checkout automatically, while 'git sparse-checkout' restricts the working tree to the specified directory, further minimizing data transfer.

Topics

#Git Large Repository Optimization#Scalar CLI#Sparse Checkout#Azure Repos / Git Commands

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice