nerdexam
CompTIA

XK0-005 · Question #769

Which of the following Git commands would send committed changes to a remote repository?

The correct answer is C. git push origin master. git push origin master pushes committed changes to the remote repository. git stash temporarily saves changes but does not push them. git commit -a commits changes but does not send them to the remote repository. git add . stages changes but does not commit or push them.

Scripting, Containers, and Automation

Question

Which of the following Git commands would send committed changes to a remote repository?

Options

  • Agit stash
  • Bgit commit -a
  • Cgit push origin master
  • Dgit add

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    89% (33)
  • D
    3% (1)

Explanation

git push origin master pushes committed changes to the remote repository. git stash temporarily saves changes but does not push them. git commit -a commits changes but does not send them to the remote repository. git add . stages changes but does not commit or push them.

Topics

#Git#Version Control#Remote Repository#git push

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice