Skip to content

Instantly share code, notes, and snippets.

@suziewong
Last active June 29, 2017 10:26
Show Gist options
  • Save suziewong/4378780 to your computer and use it in GitHub Desktop.
Save suziewong/4378780 to your computer and use it in GitHub Desktop.
gitlab上的多人协作

gitlab上的多人协作

gitlab上的所有git操作上都是和github之类没撒区别的。 除了功能上。这里介绍一下使用gitlab这样的私库是如何实现多人协作的。

1.首先A项目负责人(master)创建库,并且让B(developer)拥有开发权限

2.然后A,B都可以直接add commit push

因为github 与gitlab的区别就是一个是 以人为单位,一个以项目单位

看url就可以看出来 suziewong有个gilabhq的项目

https://github.com/suziewong/gitlabhq.git

在gitlab里有个nav的项目(所以项目不能重名,所以也只是用于内部,不会重复)

https://gitlab.zjut.com/nav.git

3.远程分支 可以看我另外一篇gist 选项里选择merge request 就可以在线自动merge不同分支的代码了。

备注

这里比较蛋疼疼的情况是 merge request 出现了 Checking for ability to automatically merge

网上发现解决方法(未测试)

好吧,上面没修好的话,相当蛋疼,也就是说,不能远程提交代码并合并,也就是得有人去自己merge 不过还好每个人(developer)都是有权限push的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment