DEV Community

Ayrton
Ayrton

Posted on

Why you don't use Gitlab ?

Hey Githubers!

Today, I will try to convert you to use GitLab as main repo support for your projects.

I discover Gitlab about 6 months, and the first thing I've find very cool, its the subproject support.

You can do your project architecture as this :

MyProject
  - backend
  - frontend
Enter fullscreen mode Exit fullscreen mode

so the url of repo is :

https://gitlab.com/myproject/backend
https://gitlab.com/myproject/frontend

very cool no ?

Push directly with command line

Simply use this command if the repo doesn't exist

git init
git remote add origin https://gitlab.com/<GroupProject>/<Project>
git add .
git commit -m "initial release"
$git push -u origin master
Enter fullscreen mode Exit fullscreen mode

The -u command on git push is to set a new project if it doesn't exist.

Another thing

Private package registry

For an entreprise is really useful to have Private package registry.

Packages registry is a cloud image of your project for a reuse as container by exemple.
For exemple, you can set in Docker a gitlab registry.

like:
docker-compose.yml

image:registry.gitlab.com/<GroupProject>/<Project>
Enter fullscreen mode Exit fullscreen mode

If you love gitlab, set a comment. (and clap your handsπŸ‘) 🎢

Top comments (29)

Collapse
 
elc0mpa profile image
Jose Gabriel Companioni Benitez

Well, actually this is something I found interesting, I have been using Github since two years ago, but recently tried Gitlab and it looks interesting, but I think is much better to use Github for personal purposes

Collapse
 
simerca profile image
Ayrton • Edited

Yes I always use Github for personal project and open source work. Gitlab is for me better for teams private project ! Thank you for your feedback πŸ™

Collapse
 
elc0mpa profile image
Jose Gabriel Companioni Benitez

That's the point, could you tell me why do you think Gitlab is better for teams private projects?

Thread Thread
 
simerca profile image
Ayrton

For me gitlab is better than github for team because the features of subproject has better , exemple

In github

  • project1-backend
  • project1-frontend
  • project2-backend
  • project2-frontend

In gitlab

  • Project1
    -- Backend
    -- Frontend

  • Project2
    -- Backend
    -- Frontend

For the both each project has a repo but gitlab. With subproject can be more organized .

And lots of tools for the team is interacted with cli or UI tools.

Collapse
 
hoangviethung profile image
Roger

year bro that true

Collapse
 
renzodiaz profile image
Renzo Diaz

I use gitlab for everything, although GitHub is popular than gitlab. Gitlab is a complete tool, you can manage your team, you can setup CI/CD, install in your own server etc. For me gitlab is better than GitHub In terms of devOps.

Collapse
 
simerca profile image
Ayrton

Very helpful for devops ! πŸ‘

Collapse
 
juanfrank77 profile image
Juan F Gonzalez

I now have to use it for the client's project I recently joined. It's soooo different compared to GitHub that it will take me a while to get used to.

Fortunately, I do most of my stuff with the command line so won't need to learn much how their UI works.
Other than that, GitHub has pretty much everything I need and it keeps getting more and more awesome with every new release sooo

Collapse
 
perpetual_education profile image
perpetual . education • Edited

The biggest reason we're thinking about switching to gitlab (we have many repos in bitbucket, github, gitlab, you name it...) - is because github is owned by Microsoft - and they also own Atom, VScode, and now basically NPM... and - well, Microsoft sucks... and they make crappy stuff... so / yeah... things don't look good for that ecosystem. Open source is a lot less like "a free and open web" and a lot more like "free shit to help business men make stuff to make them money with no accountability" these days. Gitlab also has a ton of fancy options that GitHub doesn't have.

Collapse
 
akrami profile image
Alireza Akrami

Oh, that seems a good feature that comes handy. I recently got two repos on GitHub for one of my personal projects. one for backend and one for frontend, and I had to reference each comment and issue between them.

Collapse
 
neeldev96 profile image
Neel

I started using git from 2018 and my first remote repo service was gitlab. The problem I noticed was that gitlab had a little too much when I started using it. I mean, I was a beginner to git and even development and I was spooked by concepts like the readily available CI/CD and all other sophisticated features it has. This made me move towards github for it's simplicity. Don't get me wrong, I still use both gitlab and github, but my repos have rooted hard with github and it is now hard to move away.

May be I will push my next project completely to gitlab to give it a try.

Collapse
 
simerca profile image
Ayrton

Yes, gitlab is more complex than github at the first time, but when you use the CLI command tools it's very similar, but when you upgrade your skill, you will be happy to have started with gitlab.

Thank you for your feedback !

Collapse
 
aboutdavid profile image
David

Cool! Also, in my opinion, Gitlab looks newer (if you think about it).

Also, one thing I want to ask is I thought GitHub had their own package server for npm, nuget, mavern, rubygems, and docker? Or are they just public only?
(More info: Packages for orgs - github.com/orgs/{orgname}/packages, personal packages - github.com/{username}?tab=packages)

Collapse
 
simerca profile image
Ayrton

Discuss with me, I'm not a crocodile 🐊

Collapse
 
olearycrew profile image
Brendan O'Leary πŸ‘¨πŸ»β€πŸ’»

GitLab team member here.

Great article!

Collapse
 
simerca profile image
Ayrton

too many power here with you on this post :D Thank you for your visit/message

Collapse
 
cod3slinger profile image
Cod3slinger

GitLab's self-hosted CE package w/ a robust CI/CD toolset is everything!

Collapse
 
simerca profile image
Ayrton

1000 % alright !

Collapse
 
stef4nutz profile image
stephen

I'm mostly familiar with Github so maybe that's the main reason why I don't use Gitlab but still a good tutorial.