Software Engineering · Question 10 · Medium
What is the difference between git fetch and git pull?
- git fetch uploads local commits, while git pull downloads remote commits
- They are aliases for the same command
- git fetch downloads remote changes without merging them, while git pull fetches and then integrates them into the current branch
- 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
- A program's control flow graph has 9 edges and 7 nodes and is a single…
- What is the main purpose of regression testing?
- What distinguishes the Spiral model from other SDLC models?
- Good software design aims for which combination of cohesion and coupling?
- A function accepts an integer age that is valid from 18 to 60. Using…
- What happens after running git reset --soft HEAD~1?
- When does git perform a fast-forward merge of branch feature into main?
- Which of the following is NOT one of the four value statements of the Agile…
- Testing carried out by the developer organisation's own staff at the…
- In software engineering, what does SRS stand for?
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