XK0-005 · Question #407
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. To view the history of changes made to a Git repository's references, such as the HEAD, the git reflog command is used.
Question
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?
Options
- Agit commit log
- Bgit branch list
- Cgit reflog
- Dgit push log
How the community answered
(61 responses)- A2% (1)
- B2% (1)
- C92% (56)
- D5% (3)
Why each option
To view the history of changes made to a Git repository's references, such as the HEAD, the `git reflog` command is used.
`git commit log` is not a valid Git command; the correct command to view commit history is `git log`.
`git branch list` is not a valid Git command; `git branch` lists local branches.
The `git reflog` command displays a log of all changes made to the local repository's references (like HEAD, branches, and stashes), showing where the HEAD pointer has been over time, including commits, resets, merges, and other operations.
`git push log` is not a valid Git command; `git push` sends local commits to a remote repository and does not have a `log` subcommand.
Concept tested: Git repository history and reference logs
Source: https://git-scm.com/docs/git-reflog
Topics
Community Discussion
No community discussion yet for this question.