Interview Prep/Git & GitHub/Scale, Submodules, LFS and GitHub Automation

A merge shows a conflict on a submodule path, not on files. What is it?

IntermediateScenarioScale, Submodules, LFS and GitHub Automation
Answer

Situation read → Both branches moved the submodule pointer to different commits.

What I'd do →

  1. git diff shows Subproject commit lines for each side.
  2. Pick the correct commit, often the newer one, if one contains the other: cd libs/shared && git log --oneline --graph A B.
  3. git add libs/shared after checking out the chosen commit, then continue the merge.
  4. Test the parent project with that pointer.

Why → The parent only records a SHA, so the conflict is a choice between two SHAs.

Interview tip → If neither contains the other, merge inside the submodule first.

All Git & GitHub questions Roadmap: Git & GitHub

More on Scale, Submodules, LFS and GitHub Automation