首页 > 代码库 > git mirror的创建与使用

git mirror的创建与使用

please donwload repo mirro as follow steps, thanks


1.mirror server,server IP:192.168.0.123

1.1

-- delete the old version repo bin file;
-- $sudo apt-get install semc-gitwizard(donwload sony repo bin file);
-- open a new terminal(make repo bin file available);
-- download repo mirror as follow,
$mkdir ~/my_mirror
$cd ~/my_mirror

$repo init -u git://XXXX/manifest.git -b xxxx --mirror

$repo sync

1.2 share your mirror

在/etc/exports加句

/home/your_username/my_mirror     *(ro,async,no_root_squash,nohide)

执行
$ sudo exportfs -rv

/*上面括号ro读rw读写权限*/


2.--work with mirror

2.1. Local

$mkdir ~/my_repos
$mkdir ~/my_repos/<branch_name>
$cd ~/my_repos/<branch_name>

$repo init -u git://XXXX/manifest.git -b xxxx --reference=/home/<path>/my_mirror


2.2.other PC (client):

$sudo mkdif nfs

$sudo mount 192.168.0.123:/home/mirror_path/my_mirror  /mnt/nfs

$mkdir ~/my_repos
$mkdir ~/my_repos/<branch_name>
$cd ~/my_repos/<branch_name>

$repo init -u git://XXXX/manifest.git -b xxxx --reference=/mnt/nfs

$ repo sync

git mirror的创建与使用