Git submodule init async

后端 未结 4 1480
一生所求
一生所求 2021-02-19 16:21

When I run git submodule update --init first time on a projects which have a lot of submodules, this usually take a lot of time, because most of submodules are stor

4条回答
  •  不要未来只要你来
    2021-02-19 17:03

    Linux:

    cat .gitmodules | grep -Po '".*"' | sed 's/.\(.\+\).$/\1/' | while sleep 0.1 && read line; do git submodule update --init $line & done
    

    Mac:

    cat .gitmodules | grep -o '".*"' | cut -d '"' -f 2 | while sleep 0.1 && read line; do git submodule update --init $line & done
    

提交回复
热议问题