Git: Fix error "default: No submodule mapping found"

Submitted by Peter Majmesku on Tue, 12/12/2017 - 14:26

This error comes up, if you build your project with Composer and you have added un-registered Git submodules (in file .gitmodules) via a Git commit. A possible solution.

Firstly de-init all Git Submodules: 

git submodule deinit --all

Then remove the specific Git submodule "entirely" (uncommited data, commited data and the folder itself):

git rm -rf --cached <path-to-missing-module>
git rm <path-to-missing-module>
rm <path-to-missing-module>

Now you can run your packaging/build process with e.g. Composer or Vagrant again. You should get this success message:

Cleared directory 'my/path'

Alternatively you can edit the .gitmodules file to register the Git submodules.

Tags

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.