repo forall -c 用法【转】

本文转载自: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)
原文地址:https://www.cnblogs.com/zzb-Dream-90Time/p/10075243.html