Try to change submodule as described in git book
$ git rm -r vendor/html-minifier
$ git submodule add https://github.com/kangax/html-minifier.git vendor/html-minifier
But it fails with following
rm 'vendor/html-minifier'
fatal: git rm: 'vendor/html-minifier': Is a directory
After pulling changes from server, many times my submodule head gets detached from master branch. This is a common case when one does not use submodules too often or has just started with submodules.
There are two Git commands a developer must use in order to discard all local changes in Git, remove all uncommited changes and revert their Git working tree back to the state it was in when the last commit took place. The commands to discard all local changes in Git are: git reset –hard. git clean -fxd.
From http://txt.binnyva.com/2008/07/remove-a-folder-from-git/
git rm -r vendor/html-minifier/.
Or maybe (from https://serverfault.com/questions/256421/cant-git-rm-a-directory)
git rm --cached -r dirname
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With