Linux 搭建git服务器

$ mkdir runoob
$ cd runoob
$ git init
Initialized empty Git repository in /Users/tianqixin/www/runoob/.git/

关键点:

.git/config 配置文件加上以下。否则git push失败

[receive]

  denyCurrentBranch = ignore

 

提交代码之后, 服务器是看不到src文件的。

需要git reset --hard即可

posted @ 2021-08-14 10:44  huhis  阅读(54)  评论(0)    收藏  举报