HstarDoc icon indicating copy to clipboard operation
HstarDoc copied to clipboard

如何移除Git SubModule

Open hstarorg opened this issue 7 years ago • 0 comments

0. mv a/submodule a/submodule_tmp

1. git submodule deinit -f -- a/submodule    
2. rm -rf .git/modules/a/submodule
3. git rm -f a/submodule
# Note: a/submodule (no trailing slash,尾巴上没有斜杠)

# or, if you want to leave it in your working tree and have done step 0
3.   git rm --cached a/submodule
# 还原目录
mv a/submodule_tmp a/submodule 

hstarorg avatar Jan 13 '18 06:01 hstarorg