Microsoft DevOps Engineer Expert AZ-400 Practice Question
Your Azure Repos Git repository has grown to more than 5 GB because several hundred *.mp4 files were committed months ago. Clone and fetch operations are now slow. You must reduce the repository's size while still keeping the videos available in the history through Git Large File Storage (LFS). The solution should rewrite the existing commits with minimal manual effort and require contributors to take only one clear action afterward. Which approach should you recommend?
Add *.mp4 entries to .gitattributes, run "git gc --aggressive" on the server, and ask contributors to pull the latest commits.
Create a new repository, enable Git LFS, recommit the mp4 files via LFS, and delete the original repository.
Run "git lfs migrate import --include='*.mp4' --everything" in a local clone, force-push the rewritten branches and tags, then instruct all contributors to reclone the repository.
Enable Scalar on the current repository to virtualize large files and execute "git maintenance run" on all clients.
Running "git lfs migrate import" rewrites every reachable commit, replacing the large *.mp4 blobs with lightweight LFS pointer objects while preserving commit metadata. Using the --everything switch ensures all branches and tags are rewritten at once. After the force-push, the server no longer stores the binary blobs, so repository size drops dramatically. Because history is rewritten, every contributor must reclone or at least reset local references; a fresh clone is the simplest, least error-prone step. Adding patterns to .gitattributes and simply running git gc cannot remove blobs that are already part of history. Creating a brand-new repository discards commit history, violating the requirement to keep it. Scalar improves performance for large repositories but does not migrate blobs into LFS or shrink repository size.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Git LFS and how does it work?
Open an interactive chat with Bash
Why is the 'git lfs migrate import' command necessary for this solution?
Open an interactive chat with Bash
Why do contributors need to reclone the repository after the migration?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Design and implement a source control strategy
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .