🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Rebase vs Merge and Clean History: all 15 questions

Quiz: Rebase vs Merge and Clean History · Question 3 of 15

What does git merge --ff-only feature/cart do if main and the feature have diverged?

What does git merge --ff-only feature/cart do if main and the feature have diverged?

  1. A.Creates a merge commit
  2. B.Refuses to merge
  3. C.Rebases automatically
  4. D.Deletes the feature branch
Answer & explanation

Correct answer: Refuses to merge

--ff-only only allows a fast-forward; with divergent history, a merge commit would be needed, so Git stops.

Can you get the rest right without peeking?

Take the timed Quiz: Rebase vs Merge and Clean History quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →