200-901 · Question #267
200-901 Question #267: Real Exam Question with Answer & Explanation
The correct answer is C: git add. {"question_number": 3, "question": "A file that already exists in a local repository is updated. Which command must be executed to ensure that the changes in the file are included in the next Git commit?", "correct_answer": "C", "explanation": "git add stages file changes so they
Question
A file that already exists in a local repository is updated. Which command must be executed to ensure that the changes in the file are included in the next Git commit?
Options
- Agit update
- Bgit merge
- Cgit add
- Dgit rebase
Explanation
{"question_number": 3, "question": "A file that already exists in a local repository is updated. Which command must be executed to ensure that the changes in the file are included in the next Git commit?", "correct_answer": "C", "explanation": "git add stages file changes so they are included in the next commit. Even for files already tracked by Git, modifications must be explicitly staged with git add <filename> (or git add .) before running git commit. Without this step, the changes remain in the working directory but are not committed. git update is not a valid Git command. git merge integrates branches, not individual file changes. git rebase replays commits onto another base branch - it does not stage files.", "generated_by": "claude-sonnet", "llm_judge_score": 3}
Topics
Community Discussion
No community discussion yet for this question.