Git submodule init async

后端 未结 4 2336
清酒与你
清酒与你 2021-02-19 16:02

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 16:55

    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
    

提交回复
热议问题