xinre / accumulate

All the things I've accumulated in my career
1 stars 0 forks source link

git submodule add issue #6

Open xinre opened 1 year ago

xinre commented 1 year ago
git submodule add https://github.com/iphysresearch/GWToolkit.git GWToolkit
git add .gitmodules GWToolkit
git commit -m "add submodule"
git push origin main
# 恢复 .gitmodules 文件
git fetch origin
git checkout origin/main -- .gitmodules

# 撤销对 .gitmodules 文件的修改
git reset --hard HEAD
# 或者
git checkout -- .gitmodules
xinre commented 1 year ago

git submodule foreach 它能在每一个子模块中运行任意命令