Microsoft DevOps Engineer Expert AZ-400 Practice Question
Your team's Azure Repos Git repository contains several years of history in which artists committed *.png and *.fbx game-asset files that are typically 200-400 MB each. Cloning the repo now takes more than 30 minutes and CI pipelines routinely exceed the 5 GB checkout limit. You must migrate the existing objects to Git Large File Storage (LFS) so that only lightweight pointer files remain in regular Git history, while preserving commit metadata. Which approach meets the goal with the least manual effort?
Use git filter-branch with a tree-filter that calls git lfs track for each commit, then push the result to origin.
Run git lfs track ".png" ".fbx", commit the updated .gitattributes file, and push the branch normally.
Install Git LFS locally, then execute git lfs migrate import --include=".png,.fbx" --include-ref=refs/heads/*; afterward push the rewritten history with git push --force-with-lease --all && git push --force-with-lease --tags.
Enable the Large File Checkout option in Azure Repos and perform git gc to prune existing large blobs.
The git lfs migrate import command rewrites the repository's history, replacing the specified paths with LFS pointer files and adding the binary content to the LFS store. It preserves commit hashes except for those whose blobs are rewritten and automatically updates tags and branch tips. After the rewrite, a force-with-lease push is required to replace the server-side history. Merely tracking patterns with git lfs track affects only future commits, while git filter-branch requires complex scripting and is discouraged for large histories. Azure Repos has no server option named "Large File Checkout," so enabling such a setting would not migrate existing blobs.
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 manage large files?
Open an interactive chat with Bash
What does git lfs migrate import do during a migration?
Open an interactive chat with Bash
What is the significance of using 'force-with-lease' when pushing changes after migration?
Open an interactive chat with Bash
What is Git LFS and how does it work?
Open an interactive chat with Bash
Why is the git lfs migrate import command necessary?
Open an interactive chat with Bash
Why is force-with-lease push used after migrating to Git LFS?
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 .