Microsoft DevOps Engineer Expert AZ-400 Practice Question
A 900-MB customer database dump was accidentally committed to the main branch of an Azure Repos Git repository. Multiple feature branches were created after the commit. You must permanently remove the dump from the entire history of all branches, minimize repository size, and ensure future clones cannot download the file. The solution should require the fewest steps and be compatible with any Git hosting service. Which approach should you recommend?
Use git filter-repo to delete the dump from all refs, then force-push the rewritten branches and tags.
Commit a deletion of the dump in main and merge or cherry-pick that commit into every feature branch.
Revert the commit that added the dump and push the revert with --force to all branches.
Run git lfs migrate import to convert the dump to Git LFS, then push the changes.
git filter-repo rewrites the entire commit history, deleting the specified path from every ref (branches, tags, and remotes) in a single command. After force-pushing the rewritten refs, the large file and its blobs are no longer reachable, so clones and fetches cannot retrieve it and the repository size shrinks. A regular delete commit or git revert only removes the file from the working tree while leaving the blob in history. git lfs migrate import converts the file to LFS but still retains the large object; the repository remains large and sensitive data persists. filter-repo offers a faster, simpler interface than BFG or filter-branch and is fully cross-platform and host-agnostic.
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 filter-repo and how does it work?
Open an interactive chat with Bash
Why is git filter-repo better than git filter-branch or BFG?
Open an interactive chat with Bash
What are Git LFS and why doesn’t it completely remove large files?
Open an interactive chat with Bash
What is git filter-repo and how does it work?
Open an interactive chat with Bash
How does force-pushing affect rewritten branches after using git filter-repo?
Open an interactive chat with Bash
What are the limitations of other options like git revert or git lfs migrate import in this scenario?
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 .