git submodule init 没反应的处理方法
尝试重新来一次。
The way I got around this was to manually clean up and reinit my problematic submodule:
git submodule deinit the_submodule
git submodule init the_submodule
git submodule update the_submodule
Note that at this time (early 2023), unfortunately, git worktree does not play nice with submodules. The manpage for git-worktree lists under BUGS:
Multiple checkout in general is still experimental, and the support for submodules is incomplete. It is NOT recommended to make multiple checkouts of a superproject.
(emphasis mine)
Edit: You can also continue git operations even with the broken submodule state by disabling the submodule.recurse option (default off), either through git config or on a per-command basis with git -c submodule.recurse=no subcommand …
参考: