set windows git env variable
set GIT_HOME=C:\Program Files (x86)\git
set PATH=%PATH%+;C:\Program Files (x86)\git\bin
register ssh key
cd C:\Program Files (x86)\git\bin
ssh-agent bash
eval $(ssh-agent -s)
ssh-add "C:\Users\XXX\.ssh\id_rsa" (ssh-add ~/.ssh/id_rsa)
add submodule
in git bash module
git submodule add --force ssh://git@githost:7999/ep/test1.git test1
git submodule add ssh://git@githost:7999/ep/test2.git test2
git submodule add ssh://git@githost:7999/ep/test3.git test3
git commit -m "add submodule"
delete submodule
vi .gitmodules remove the submodule rows
vi .git/config remove the submodule rows
cd ./git/modules/
rm -rf test1
git rm --cached test1
返回根目录
rm -rf test1
初始化和更新
git submodule init
git submodule sync --recursive
git submodule update --init --recursive
cd test1
git status
git checkout --force test1
git pull origin test1
cd ..
git status
git add test1
git commit -m "update"
git push origin HEAD
Git Submodule使用完整教程
http://www.360doc.com/content/13/0110/10/7991404_259310693.shtml