GH-900 · Question #4
What are three valid states for a file in a git repository? (Choose three.)
The correct answer is A. Committed B. Modified D. Staged. In a Git repository, a file can be in one of the following three valid states: Committed: The file is saved in the local repository. It is part of the permanent history of the Modified: The file has been changed but not yet staged or committed. It is in the working Staged: The…
Question
What are three valid states for a file in a git repository? (Choose three.)
Options
- ACommitted
- BModified
- CUncommitted
- DStaged
- ETracked
How the community answered
(49 responses)- A90% (44)
- C6% (3)
- E4% (2)
Explanation
In a Git repository, a file can be in one of the following three valid states: Committed: The file is saved in the local repository. It is part of the permanent history of the Modified: The file has been changed but not yet staged or committed. It is in the working Staged: The file has been marked to be included in the next commit. It is in the staging area, ready to be committed. These states represent the typical lifecycle of a file as it moves through the process of being edited, reviewed, and saved in Git.
Topics
Community Discussion
No community discussion yet for this question.