Author Ronald Mai GDC Architect
Gitlab is a self hosted git management system, or the poor man’s Github. And this is my opinionated review on it:
Differences with Github
- All projects are system level, you can’t create project under your account. As a developer, you can only create branches in the repository.
- Issues are not related to commits, in order to fix an issue, you need to submit a merge request, and then close that issue.
- Gitlab can be integrated with LDAP, user can sign in via LDAP. Every LDAP user can create 10 projects by default.
- All projects are private, the project owner need to assign other developers to his/her project.
- Small code snippets can be shared via Snippets tab.
- You can deploy it on your own server.
- It’s free & open source.
Due to these differences, our workflow needs to be adjust accordingly:
My Gitlab Workflow
- Create a new project
- Protect the master branch
- Ask the developers to log in via LDAP if they haven’t done so
- Assign them to the project
- Developers create feature branches
- Developers submit merge requests from feature branches to master
- I merge them to the master branch
My Release Management Workflow
- Create a release branch
- Protect that branch
- Developers create bug fixing branches
- Developer submit merge request from bug fixing branches to release branch
- I merge them to release branch & master
Conclusion
Gitlab is suitable for small scale collaboration, if you want to deploy it throughout the whole organization, the “all projects are private” setting could be cumbersome.
How do you protect branches in gitlab? I assume this is something you put in the gitolite configuration?
Answering my own question for anyone else who wonders the same thing:
Create and push your branch to gitlab if necessary:
git branch stable
git push origin stable
On Gitlab as a ‘master’ user:
1. Click ‘commits’ tab.
2. Click ‘branches’ sub-tab.
3. Click ‘protected’ sub-sub-tab.
4. Select branch name from menu.
5. Click ‘protect’ button.
per-user repositories seem to be possible with GitLab, see:
http://stackoverflow.com/questions/11844683/configuring-gitlab-to-store-repositories-for-each-user-in-personal-directory
The GitLab feature is called: “wild repos”:
http://sitaramc.github.com/gitolite/wild.html