I'm trying to add a git repo with our corporate wp plugins to a wp project as a submodule:
git submodule add git@bitbucket.org:company/our-wp-plugins.git htdocs/wp-content/plugins/
Firstly I got this error:
'htdocs/wp-content/plugins' already exists in the index
So I removed it from the index with git rm -r --cached htdocs/wp-content/plugins
, but this time I got another error:
'htdocs/wp-content/plugins' already exists and is not a valid git repo
Could I add somehow a submodule to an existing non-empty folder without creating a new subfolder?