Exception of git submodules add: A git directory for ‘XXXX’ is found locally with remote(s):

Git command add submodule:

git submodule add <git repository url> <folder name>

It throws exception:

A git directory for '010-HTML' is found locally with remote(s):

  origin https://github.com/imben1109/techoffice-js.git

If you want to reuse this local git directory instead of cloning again from

  https://github.com/imben1109/techoffice-web.git

use the '--force' option. If the local git directory is not the correct repo

Solution:

Delete cache in the folder .git/modules/<folder name>

rm -fr .git/modules/<folder name>