Tech News
← Home  ·  All topics

Submodules

1 GoKawiil brief on this topic

Git worktree and submodule interaction still forces manual --force after 11 years

A developer examining Git's command-line safety flags found that removing or moving a git worktree containing submodules requires the --force flag, a restriction dating back to git worktree's 2015 introduction. The analysis traces how git worktree add had to be patched to ignore submodule.recurse to avoid corrupting empty submodule paths, and argues that git submodules function as a de facto package manager, with the gitlink SHA acting as a lockfile entry and .gitmodules as the manifest.