在服务器指定路径下执行创建裸仓库命令:
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