1. 在文件夹repo中执行git init新建git仓库
  2. 在 repo目录下执行git config --local receive.denyCurrentBranch updateInstead
  3. 执行git config --global sendpack.sideband false
  4. 在repo的上级目录中执行git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack开启服务器,保持开启不要关闭。
  5. 在新建文件夹中git clone git://127.0.0.1/repo,push此时也可用
  6. git clone git://192.168.*/repo
  7. git pull git://19168.1.*/repo
  8. git push git://192.168.1.*/repo
  9. 添加所有文件:git add .(点也要)【git add .
  10. 提交文件:git commit -m "test"
Logo

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

更多推荐