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 →
git diffshowsSubproject commitlines for each side.- Pick the correct commit, often the newer one, if one contains the other:
cd libs/shared && git log --oneline --graph A B. git add libs/sharedafter checking out the chosen commit, then continue the merge.- 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.
More on Scale, Submodules, LFS and GitHub Automation
A monorepo has 4 GB of history and developers only touch one service. How do you make their day-to-day faster?IntermediateDesigners commit PSD and video assets, and the repo keeps growing. How do you move them to Git LFS?IntermediateYour GitHub LFS bandwidth quota is exhausted and CI pulls fail. What do you do?AdvancedA repository uses a submodule. How does a developer get the right version of it?BeginnerSubmodules, subtree or a package manager for sharing code between repos?IntermediateCI cannot clone a private submodule: authentication fails in `actions/checkout`.Intermediate