其中repo forall这个命令的意思是针对repo下所有的git库进行同样的操作
repo forall -c 后接git命令,比如说你要查看所有git库中的代码情况,可以执行repo forall -c git status
如果你要查看提交状态,可以执行repo forall -c git log --stat
[root@SVR6 repo-client1]# repo forall -c git log --stat
... A new repo command ( 1.19) is available.
... You should upgrade soon:
cp /home/Neo/repo/repo-client1/.repo/repo/repo /bin/repo
commit 789317be88ecdc12b53e4c422016494d636b6b32
Author: root <root@SVR6.0_32_1>
Date: Thu Apr 25 15:52:27 2013 +0800
create project1
0 files changed, 0 insertions(+), 0 deletions(-)
commit 707deec1441ad98aba3fd845f2de79a708eaeb1c
Author: root <root@SVR6.0_32_1>
Date: Thu Apr 25 15:52:51 2013 +0800
create project2
0 files changed, 0 insertions(+), 0 deletions(-)
[root@SVR6 repo-client1]#
总结:repo其实就是许多Git仓库的总管理员,便于管理和操作的一个python脚本,如果不是很大型的项目,用一个git仓库就好了,如果项目多且大,需要分开管理,那还是使用repo来管理比较好
