XK0-005 · Question #117
An engineer is working on a production application deployment that requires changing a web application property file called that is managed by the Git version control server.property system. A…
The correct answer is D. git push server.property. After committing changes locally, the engineer needs to use git push to send the local commits to the remote repository, making the changes available to others and for deployment.
Question
Options
- Agit init server.property
- Bgit merge server.property
- Cgit add server.property
- Dgit push server.property
How the community answered
(31 responses)- A3% (1)
- C6% (2)
- D90% (28)
Why each option
After committing changes locally, the engineer needs to use `git push` to send the local commits to the remote repository, making the changes available to others and for deployment.
The `git init` command initializes a new Git repository, which is not needed here as the repository was already cloned.
The `git merge` command is used to integrate changes from one branch into another, which is not the immediate missing step after a local commit for pushing to a remote.
The `git add` command stages changes for the next commit; however, the question states `git commit` was executed, implying `git add` either preceded it or the commit failed, but if the commit succeeded, `git push` is the next step to publish changes remotely.
The `git push` command is used to upload local repository commits to a remote repository, making the changes visible to other collaborators and for subsequent deployment processes. Without `git push`, the changes remain only on the local desktop computer and are not synchronized with the central version control system.
Concept tested: Git workflow - pushing local changes to remote
Source: https://git-scm.com/docs/git-push
Topics
Community Discussion
No community discussion yet for this question.