1.使用repo命令批量提交多个库的修改
repo forall project1 project2 -c git add -A
repo forall project1 project2 -c git commit -m 'commit comment here’
repo forall project1 project2 -c 'git push $REPO_REMOTE HEAD:refs/for/$REPO_RREV'
注意:a. git add -A 中-A参数包括了add modify delete操作的内容,因此如果你删除一个文件 这么写也是生效的 不用担心是否还要挨个库执行git rm filename
b. 如果repo forall后面没有写任何project 就是对所有的project执行-c操作。
2.
本文介绍如何使用Repo命令来批量提交多个项目的更改。通过简单的命令行操作实现git add, git commit和git push的功能,并且适用于文件的增加、修改及删除等场景。
4239

被折叠的 条评论
为什么被折叠?



