$ repo upload
如果有多个项目同时进行了改动,为了避免出错,会弹出编辑器显示有改动需要提交的项目列表。
# Uncomment the branches to upload: # # project test/test1/: # branch jiangxin ( 1 commit, Mon Oct 25 18:04:51 2010 +0800): # 4f941239 0.2-dev -> 0.2-jiangxin # # project test/test2/: # branch jiangxin ( 1 commit, Mon Oct 25 18:06:51 2010 +0800): # 86683ece 0.2-dev -> 0.2-jiangxin
每一行前面的井号是注释,被忽略的行。将希望提交的分支前的注释去掉,就可以将该项目的分支执行推送动作。如下我们把两个分支的注释都去掉了,要对这两个项目当前分支的改动 push 到上游服务器。
# Uncomment the branches to upload: # # project test/test1/: branch jiangxin ( 1 commit, Mon Oct 25 18:04:51 2010 +0800): # 4f941239 0.2-dev -> 0.2-jiangxin # # project test/test2/: branch jiangxin ( 1 commit, Mon Oct 25 18:06:51 2010 +0800): # 86683ece 0.2-dev -> 0.2-jiangxin
保存退出(如果使用 vi 编辑器,输入 :wq 执行保存退出)后,马上开始对选择的各个项目执行 git push。
Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 293 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To ssh://[email protected]/ossxp-com/test1.git 27aee23..4f94123 jiangxin -> master Counting objects: 5, done. Writing objects: 100% (3/3), 261 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To ssh://[email protected]/ossxp-com/test2.git 7f0841d..86683ec jiangxin -> master -------------------------------------------- [OK ] test/test1/ jiangxin [OK ] test/test2/ jiangxin