一个80后
程序员的笔记

Git库批量转移

# git pull

#!/bin/sh
for line in $(<projects);
    do
        git clone --bare git@192.168.40.4:/$line.git;
done

# git push

#!/bin/sh
for line in $(<projects);
    do
        cd ./${line##*/}.git;
        git push --mirror;
        cd ..;
done

# projects
yxt/manage/crontab
yxt/manage/announce
yxt/manage/announce_old
yxt/salesman_admin_ui
yxt/salesman_admin_api
yxt/topdf
yxt/sms
yxt/demo
yxt/sys_ui
yxt/gov_ui
yxt/html5
yxt/gov_api
yxt/static
yxt/admin_ui
yxt/api
yxt/gitbook
yxt/ios
yxt/admin_api
yxt/android
赞(0) 打赏
未经允许不得转载:笨笨天地 » Git库批量转移
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏