SP(server-path) 服务器路径: /home/www
G(git) git文件夹: git1.git
服务器中用Nginx配置好目录指向SP中.
初始git库在SP中, sudo git init --bare git1.git
在G文件夹中,
mv hooks/post-update.sample hooks/post-update
chmod a+x hooks/post-update
git update-server-info
克隆: git clone http://(ip或域名)/git1.git
待解决
目前这种方式只是支持只读(克隆), 但是不支持push(提交).