在服务器指定路径下执行创建裸仓库命令:

git init --bare

成功创建仓库之后,在仓库根目录执行以下命令开启git daemon服务,默认监听端口为9418:

git daemon --base-path=. --export-all --reuseaddr --informative-errors --enable=receive-pack

 在客户端电脑上创建一个空文件夹,用来clone服务器上的git仓库,命令如下:

git clone git://ip:9418/ TestCloneRepoName

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐