Software Engineering · Question 14 · Hard
When does git perform a fast-forward merge of branch feature into main?
- When main has no commits of its own since feature branched off, so main's tip is an ancestor of feature's tip
- When both branches have new commits that do not conflict
- Whenever the --no-ff option is used
- Only when feature has been pushed to the remote first
Answer and explanation
Answer: A. When main has no commits of its own since feature branched off, so main's tip is an ancestor of feature's tip
Explanation: If main has not diverged, git can simply move main's pointer forward to feature's tip without creating a merge commit. Diverged branches need a real merge commit, and --no-ff forces one.
Previous: What happens after running git reset --soft HEAD~1? · Next: Which of the following is NOT one of the four value statements of the Agile…
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
- 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?
- 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?
- In Scrum, what is the fixed-length, time-boxed iteration in which the team…
- Which git command adds changes from the working directory to the staging area…
- "The results page must load within 2 seconds for up to 10,000 concurrent…
- In software quality, which question does verification answer, as opposed to…
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