Skip to main content

Development

Opinionate Review On Gitlab

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:

Gitlab

Differences with Github

  1. All projects are system level, you can’t create project under your account. As a developer, you can only create branches in the repository.
  2. Issues are not related to commits, in order to fix an issue, you need to submit a merge request, and then close that issue.
  3. Gitlab can be integrated with LDAP, user can sign in via LDAP. Every LDAP user can create 10 projects by default.
  4. All projects are private, the project owner need to assign other developers to his/her project.
  5. Small code snippets can be shared via Snippets tab.
  6. You can deploy it on your own server.
  7. It’s free & open source.

Due to these differences, our workflow needs to be adjust accordingly:

My Gitlab Workflow

  1. Create a new project
  2. Protect the master branch
  3. Ask the developers to log in via LDAP if they haven’t done so
  4. Assign them to the project
  5. Developers create feature branches
  6. Developers submit merge requests from feature branches to master
  7. I merge them to the master branch

My Release Management Workflow

  1. Create a release branch
  2. Protect that branch
  3. Developers create bug fixing branches
  4. Developer submit merge request from bug fixing branches to release branch
  5. 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.

 

Thoughts on “Opinionate Review On Gitlab”

  1. How do you protect branches in gitlab? I assume this is something you put in the gitolite configuration?

  2. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories
Follow Us