1. Home
  2. Computer Science MCQs
  3. Software Engineering
  4. In Git, what is the difference between commit and push?

Added 2 Nov 2026

In Git, what is the difference between commit and push?

  1. Both only stage files without saving them
  2. Commit uploads to a remote; push saves locally
  3. Both send changes straight to the remote
  4. Commit saves locally; push uploads to a remote Correct answer

Correct answer

D. Commit saves locally; push uploads to a remote

20 views

MCQSEXAM

Explanation

git commit records a snapshot in your local repository. git push sends those commits to a remote such as GitHub, so teammates can pull them.

Reference

Asked in: NTS, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Software Engineering MCQs

Practise all Software Engineering MCQs

Similar MCQs