Skip to content
CodeKruPro

What does rebase do to your commit ids?

QuizMediumAsked in: Accenture, Capgemini, TCS

You run git rebase main on your feature branch with two commits. What happens to those two commits?

  • They are replayed on top of the latest main as new commits with new ids; the content is the same unless conflicts were resolved
  • They keep their ids and a merge commit is added
  • They are deleted
  • They are squashed into one commit automatically

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