nerdexam
CompTIA

XK0-004 · Question #117

An engineer is working on a production application deployment that requires changing a web application property file called server.property that is managed by the Git version control system. A…

The correct answer is D. git push server.property. Git add adds a change in the working directory. For example, if you create a new file, you use git add before git commit. However, the user's not making a new file, they're changing existing files. The key here is that the user is working on a cloned copy of the remote…

Scripting, Containers and Automation

Question

An engineer is working on a production application deployment that requires changing a web application property file called server.property that is managed by the Git version control system. A cloned copy of the remote repository in which the server.property file exists is on the local desktop computer. The engineer makes appropriate changes to the files, saves it as server.property, and executes git commit –m “changed the property file” server.property. Which of the following commands did the engineer fail to perform?

Options

  • Agit init server.property
  • Bgit merge server.property
  • Cgit add server.property
  • Dgit push server.property

How the community answered

(55 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    4% (2)
  • D
    93% (51)

Explanation

Git add adds a change in the working directory. For example, if you create a new file, you use git add before git commit. However, the user's not making a new file, they're changing existing files. The key here is that the user is working on a cloned copy of the remote repository, so they have to git push their changes to that remote repository or else the changes will only be seen in their

Topics

#git add#git commit#version control#Git workflow

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice