先在hosts文件里添加

192.168.1.2   server

然后在你的代码文件里克隆下文件

git init

git clone git@server:~/php.git

克隆前得让局域网服务器端加一下你电脑的id_rsa.pub