CS FundamentalsModerateInfosys · Git interview

During git rebase main, a conflict stops the rebase. You edit the file to resolve it. What should you do next?

  1. A. git add the file, then git rebase --continue
  2. B. git commit -m "fix", then git rebase --continue
  3. C. git merge --continue
  4. D. git push --force, then git rebase --continue

Correct answer: A. git add the file, then git rebase --continue

Staging the resolved file marks the conflict as fixed; git rebase --continue then creates the rewritten commit and moves on. Committing manually would add an extra commit into the middle of the rebase.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic