2015-10-05 53 views
8

我知道我可以告訴Git的展示秀進步傳遞命令行參數--progress到,例如,當進步像混帳:對於子模塊獲取

Resolving deltas: 98% (123/125) 

取指令。但是我們有幾個大的子模塊,沒有顯示進展。如何讓Git顯示克隆子模塊的進度(例如,作爲獲取命令的一部分)?

回答

1

我來最接近的是使用這個命令:

git fetch --recurse-submodules=yes --jobs=10 

這不是給你一個進度條。但它加快了獲取存儲庫的速度。這幫助我完成了大約30個子模塊的微服務項目。

當然,你也可以與其他命令結合這之後,例如,更新倉庫沒有潛在的衝突:

# run all subprojects updates: Pull on currently selected branches 

#git submodule foreach 'git rebase origin/master; true' 
git submodule foreach ' 
    export BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) 
    git status -bs 
    if [[ "master" == $BRANCH_NAME ]] 
    then 
    git merge FETCH_HEAD --ff-only 
    else 
    echo \"NOTE this branch is $BRANCH_NAME. You must merge/rebase yourself!\" 
    fi 
'