{ "id": "git-staging-area-mcq", "title": "A Changed File That Won't Commit", "category": "Git", "isolation_type": "shared_namespace", "difficulty": "Easy", "type": "mcq", "weight": 3, "description": "## A Changed File That Won't Commit\n\nYou edit `config.py`, then run `git commit -m \"update config\"`. The commit succeeds, but when you check `git show`, your changes to `config.py` aren't in it. What Git state should you inspect first?", "options": [ { "id": "a", "text": "Whether config.py is even tracked by Git at all" }, { "id": "b", "text": "The staging area — run `git status` to check whether your changes were actually staged with `git add` before you committed" }, { "id": "c", "text": "Whether your internet connection is working" }, { "id": "d", "text": "The remote repository's branch protection settings" } ], "correct_option": "b", "explanation": "`git commit` only records what's currently in the STAGING AREA, not every change in your working tree. A modified-but-unstaged file is invisible to the next commit — `git status` shows exactly this distinction (\"Changes not staged for commit\" vs. \"Changes to be committed\"), which is why checking the staging area is the right first step, not assuming the file isn't tracked or a network issue (Git is entirely local for this operation).", "hints": [], "setup_commands": [], "default_namespace": "default", "teardown_commands": [] }