XK0-005 · Question #1402
A systems administrator wants to check the log of changes made to a Git repository. Which of the following commands can be used for this task?
The correct answer is C. git reflog. The git reflog command is used to display a log of all operations that have updated the HEAD of the repository and other references, showing a history of changes made locally to the repository's state.
Question
Exhibit
Options
- Agit commit log
- Bgit branch list
- Cgit reflog
- Dgit push log
How the community answered
(27 responses)- A4% (1)
- C93% (25)
- D4% (1)
Why each option
The `git reflog` command is used to display a log of all operations that have updated the HEAD of the repository and other references, showing a history of changes made locally to the repository's state.
'git commit log' is not a valid Git command; the correct command to view commit history is `git log`.
The `git branch list` command is not a valid Git command; `git branch` lists local branches.
The `git reflog` command displays a log of all actions that have modified the HEAD of the repository, including commits, merges, rebases, and resets, providing a comprehensive history of local repository changes that affect reference pointers.
'git push log' is not a standard Git command and does not display a log of changes made to the repository.
Concept tested: Git repository history and recovery
Source: https://git-scm.com/docs/git-reflog
Topics
Community Discussion
No community discussion yet for this question.
