Challenge - 5 Problems
Git Integrity Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What does
git fsck report when the repository is healthy?Run
git fsck on a perfectly intact Git repository. What output do you expect?Git
git fsckAttempts:
2 left
💡 Hint
Think about what
git fsck does when everything is fine.✗ Incorrect
git fsck checks the integrity of objects and links in the repository. If all is well, it reports no errors.
🧠 Conceptual
intermediate1:30remaining
What does
git fsck check in a Git repository?Select the best description of what
git fsck verifies in a Git repository.Attempts:
2 left
💡 Hint
Think about what 'fsck' stands for in other systems.
✗ Incorrect
git fsck stands for 'file system check' and verifies that all Git objects are intact and properly linked.
❓ Troubleshoot
advanced2:00remaining
You ran
git fsck and got error: missing blob object. What is the likely cause?After running
git fsck, you see the error error: missing blob object. What does this mean?Attempts:
2 left
💡 Hint
Missing blob means Git cannot find an object it expects.
✗ Incorrect
This error means some object files are missing or corrupted, which breaks the repository's integrity.
🔀 Workflow
advanced2:30remaining
What is the correct sequence to verify and repair a corrupted Git repository?
You suspect your Git repository is corrupted. Which sequence of commands correctly checks and attempts to fix it?
Attempts:
2 left
💡 Hint
Start by checking integrity, then find good commits, reset, and clean up.
✗ Incorrect
First, git fsck checks integrity. Then git reflog helps find good commits. git reset --hard restores to a good commit. Finally, git gc cleans up.
✅ Best Practice
expert3:00remaining
Which practice helps prevent repository corruption detected by
git fsck?Choose the best practice that reduces the chance of repository corruption that
git fsck would detect.Attempts:
2 left
💡 Hint
Think about maintenance and backups for safety.
✗ Incorrect
Running git gc cleans up unnecessary files and packing objects efficiently. Backups protect against data loss and corruption.