Skip to content
CodeKruPro

When is a merge a fast-forward?

QuizMediumAsked in: Accenture, Capgemini, TCS

You are on main and run git merge feature. Git prints "Fast-forward" and creates no merge commit. Why?

  • main had no new commits since feature branched off, so Git only moved main forward to feature's latest commit
  • The two branches had a conflict, so Git skipped the merge commit
  • Fast-forward means the merge was cancelled
  • Git always fast-forwards; merge commits are never created

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in