本文轉載自:https://blog.csdn.net/u010164190/article/details/78332484
1 1.repo forall命令 2 # repo forall -help 3 # repo forall -c: 此命令遍歷所有的git倉庫,並在每個倉庫執行-c所指定的命令,被執行的命令不限於git命令,而是任何被系統支持的命令,比如:ls, git log, git status等 4 2.repo forall -c使用 5 # 切換分支 6 # repo formal -c git checkout dev_test 7 # 刪除分支 8 # repo forall -c git branch -D dev_test 9 # 丟棄分支 10 # repo forall -c git git reset —hard 提交ID(或最原始:HEAD) 11 # repo forall -r framework/base/core -c git reset —hard 提交ID(或最原始HEAD)