gitosis新建项目

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fwt336/article/details/84849450

1. 添加项目和相应的用户权限

详情参考:https://blog.csdn.net/fwt336/article/details/83822419,此处不再多写。

2. 新建项目目录

2.1 登录到服务器:ssh [email protected]

2.2 进入~/git/repositories目录,执行

sudo git init --bare test.git

创建项目test.git目录

3. 克隆项目

git clone [email protected]

注意:网上有看到各种需要git init 项目的,各种需要使用git remote add origin master什么的,都不对,也许他们用的不是gitosis吧。

以上我是亲自试过的,踩了很多坑,最后发现最重要的是需要在repositories目录下执行sudo git init --bare test.git这个命令。自己新建一个目录,然后用git init是不行的!

猜你喜欢

转载自blog.csdn.net/fwt336/article/details/84849450