2016-10-23 65 views

回答

0

如果你有一个本地回购推到远程回购,并希望第二远程回购进行更新,你需要设置在第一个远程回购一post-update hook(如this answer for instance

ssh [email protected] 
cd /path/to/remote/repoA.git/hooks (#bare repository) 
git remote add B /url/to/remote/bare/repoB.git 
echo "git push --mirror B" > post-receive 
chmod 755 post-receive 
相关问题