XK0-005 · Question #10440
A new file was added to a main Git repository. An administrator wants to synchronize a local copy with the contents of the main repository. Which of the following commands should the administrator…
The correct answer is B. git pull. 'git pull' fetches changes from the remote (main) repository and merges them into the current local branch, effectively synchronizing the local copy with any new commits or files added upstream. 'git push' does the opposite - it sends local changes to the remote. 'git status'…
Question
Options
- Agit reflog
- Bgit pull
- Cgit status
- Dgit push
How the community answered
(51 responses)- A2% (1)
- B88% (45)
- C6% (3)
- D4% (2)
Explanation
'git pull' fetches changes from the remote (main) repository and merges them into the current local branch, effectively synchronizing the local copy with any new commits or files added upstream. 'git push' does the opposite - it sends local changes to the remote. 'git status' only shows the state of the working tree and staging area; it does not retrieve any data. 'git reflog' shows a log of where HEAD and branch refs have pointed locally and has nothing to do with syncing with a remote.
Topics
Community Discussion
No community discussion yet for this question.