XK0-004 · 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. The git reflog command shows a chronological log of all reference changes in a local Git repository, making it the correct tool for auditing repository history.
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
(57 responses)- A7% (4)
- B2% (1)
- C88% (50)
- D4% (2)
Why each option
The git reflog command shows a chronological log of all reference changes in a local Git repository, making it the correct tool for auditing repository history.
'git commit log' is not a valid Git command - the correct command for viewing commit history is 'git log', and 'commit' cannot be inserted between git and log.
'git branch list' is not a valid Git subcommand combination - listing branches uses 'git branch' or 'git branch --list', and it shows branch names, not a change log.
git reflog records every movement of HEAD and branch pointers, including commits, checkouts, merges, and resets, giving a complete audit trail of changes made to the repository. Unlike git log which only shows the current branch's commit history, reflog captures actions that may not appear in the commit graph, making it especially useful for reviewing all changes.
'git push log' is not a valid Git command - 'git push' sends commits to a remote repository and has no 'log' subcommand.
Concept tested: Git reference log for auditing repository changes
Source: https://git-scm.com/docs/git-reflog
Topics
Community Discussion
No community discussion yet for this question.