Software Engineering · Question 10 · Medium

What is the difference between git fetch and git pull?

  1. git fetch uploads local commits, while git pull downloads remote commits
  2. They are aliases for the same command
  3. git fetch downloads remote changes without merging them, while git pull fetches and then integrates them into the current branch
  4. git pull only updates tags, while git fetch updates branches
Answer and explanation

Answer: C. git fetch downloads remote changes without merging them, while git pull fetches and then integrates them into the current branch

Explanation: git fetch updates the remote-tracking branches only. git pull is roughly git fetch followed by git merge (or rebase) into the current branch.

Previous: What distinguishes the Spiral model from other SDLC models? · Next: Good software design aims for which combination of cohesion and coupling?

Practise software engineering

Try a fresh set of software engineering questions with an explanation after every answer, free and without signing up: Software Engineering practice. Or sit a full placement mock test.

More software engineering questions

More technical & programming practice

Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge