NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
## 目的 > 学习如何设置 Git 服务器以共享仓库。 有很多方式来通过网络共享 Git 仓库。此处是“急就章”方式。 ### 启动 Git 服务器 ~~~ # (From the work directory) $ git daemon --verbose --export-all --base-path=. ~~~ 现在,在分开的终端窗口中,转到你的工作目录。 ~~~ # (From the work directory) $ git clone git://localhost/hello.git network_hello $ cd network_hello $ ls ~~~ 你应当看到 hello 项目的拷贝。 ### 推送到 Git daemon 如果你想要推送到 Git daemon 仓库,添加 `--enable=receive-pack` 到 `git daemon` 命令。小心,因为此服务器没有授权,任何人 都能推送到你的仓库。