大话2免费版一级星盘炼化表

    1. <form id=zhudObCNh><nobr id=zhudObCNh></nobr></form>
      <address id=zhudObCNh><nobr id=zhudObCNh><nobr id=zhudObCNh></nobr></nobr></address>

      Synchronize remote repositories via Git to local server and auto update it

      翻譯:
      呂滔博客

      本篇目錄


      My Requirements

      • Git server A: remote repositories on GitHub or something like that
      • Git server B: intranet I build

      I want to build a repo on sever B which will auto synchronize with that on server A.


      How to do it

      My local repo is /www/git and let's say I want it to synchronize with https://github.com/easysoft/zsite and set it to do auto update at midnight.


      mkdir /www/git/chanzhi.git
      cd /www/git/chanzhi.git
      git clone --mirror https://github.com/easysoft/zsite.git ./

      Auto update


      git --git-dir=/www/git/chanzhi.git remote update

      Refer to this script which will make it easier.


      #!/bin/bash
      read -p "Enter local repor name:" name
      read -p "Enter remote repo url:" url
      if [ ! -n "$name" ];then
        echo "Not empty!"
      else
        mkdir -p /www/git/crond_$name.git
        cd /www/git/crond_$name.git
        git clone --mirror $url ./
        echo "1 1 * * * git --git-dir=/www/git/crond_$name.git remote update" >> /var/spool/cron/root
        echo "http://git.lvtao.net/crond_$name.git"
      fi

      Done.

      國際版
      HoME大话2免费版一级星盘炼化表