git submodule 更新異常

錯誤訊息

1
2
fatal: destination path 'xxx' already exists and is not an empty directory.
fatal: clone of 'git@bitbucket.org:xxxxx/your-repo.git' into submodule path 'xxx' failed

解法

1
2
3
git submodule deinit --force .
git submodule init
git submodule update --recursive