| 语法 | git submodule deinit [-f] <路径> |
|---|---|
| 效果 | 工作区清空、配置移除,父仓库记录不变 |
| 恢复 | git submodule update --init <路径> |
常用示例
常用示例
git submodule deinit vendor/common
git status --short
# 需要时恢复
git submodule update --init vendor/commondeinit 是可逆的轻量操作;要彻底移除还需 git rm 与清理 .git/modules(见移除条目)。