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.

Thread Thread
 
nc0 profile image
Nicolas

We should not forget the integrated CI/CD for teams in GitLab

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

Collapse
 
jkotra profile image
Jagadeesh Kotra

I host my blog and testing react app on gitlab pages. It's good but i like GH more.

Collapse
 
simerca profile image
Ayrton

Oh Github Pages are very awesome too ! 100% alright !

Collapse
 
gregorgonzalez profile image
Gregor Gonzalez

I use Gitlab a while ago. But I wasn't aware about those options. I even don't know about ci/cd. I just use the basic stuff for personal projects

Collapse
 
simerca profile image
Ayrton

Flexible, this is a keyword for gitlab. You can use it completely or juste one functionality, and when you improve your needed you can use lots of tools natively plugged on your existing project !

Collapse
 
pierrechtux profile image
Pierre

I've been on github for quite a long time, quite deceived when it was purchased by youknowwhoImtalkingabout, I'm thinking of migrating all my stuff to gitlab. Still hesitating a bit...

Also, do you think that it would it be easy to keep in sync a main repository hosted by gitlab with another one still left on github?
I'm thinking about this case for scenarios of contributing to a project hosted on github (there are still quite a number of very interesting projects hosted there...) while having a main account on gitlab.

Collapse
 
thefern profile image
Fernando B πŸš€

I do Quality Control so our area of testing is a lab and we also happen to use git, therefore I use labgit, close isn't lol.

 
c0derr0r profile image
Irkan Hadi

Oh right, I misunderstood at first. You can also host on prem using github enterprise, not for free though