GitHub vs GitLab - Why should I choose GitLab?

A potential new user here and I’m curious if I should make the switch to GitLab as a newbie developer. At this point, I’m strictly querying about free usage - not for paid accounts.

Before I ask anything I have partially read the GitLab competition and GitLab for Open Source Program pages.

I hope to get biased opinions as to why I should use GitLab over GitHub in both closed-source and open-source software development (specifically in Linux but it only matters for CI ). Here’s what I have found as of 2023 (please correct me if I’m wrong):

GitHub GitLab
Ownership Microsoft GitLab Inc.
Community & Publicity 100M+ & High publicity 30M+? & Lower publicity
Repo Storage [public] Unlimited 5 GB?
Repo Storage [private] 500 MB 5 GB
CI Compute Minutes [public] Unlimited 400 minutes (50,000 officially but I see 400)
CI Compute Minutes [private] 2000 minutes 400 minutes
Max # Collaborators [public] Unlimited Unlimited
Max # Collaborators [private] Unlimited 5

Aside from storage and (depending on your choice) ownership, GitHub seems to provide more for free tiers. This is not a criticism of GitLab as I appreciate it exists but I’m trying to make an objective decision.

Where GitLab vets open source projects manually (and annually), GitHub freely provides. Projects one writes would be more visible and can potentially be seen by more users / developers too.

For CI autodevops looks mouthwatering and it being available to use it in free tier sounds great but I have never tried it. GitHub actions seems to have somewhat comparable features but as a beginner, I won’t be able to use advanced features anyway. SonarQube seems to be available for both so neither is a clear winner for me.

Long story short, where does GitLab provide an advantage over GitHub for beginners? Thanks in advance for your answers.

1 Like

more power in gitlab, all tools and functionality in one tool, but more pricier than github. if it’s about the budget then stick with github, later on you can always migrate from github to gitlab, easily done

2 Likes

With Gitlab you can run your own Gitlab server for free. You cannot do that with Github, since you need the Enterprise version. Also, by running your own Gitlab server and also Gitlab runners, then all of the limits above do not exists. Your storage limits are only based on how much storage you give your VM. Using your own Gitlab runners, means you don’t have any CI/CD limits (since the above limits only are related to Gitlab SaaS gitlab.com)

3 Likes

Big difference will make if you will be pure Opensource project or not. Opensource projects can apply and qualify for the GitLab Opensource program. If you do, you get features worth $100/seat/month for free.

You have couple mistakes in your evaluation:

  • On GitHub you get unlimited storage for private/public repositories. The 500MB limit applies only to Packages on private repos (not repos code itself).
  • On GitLab the 5 user limit applies only to private top-level groups. If your top-level group is public, the limit does not apply (even if you have private repositories in it). In other words, it’s unlimited, just need to be careful when creating repositories to select the right visibility.
  • On GitLab the 5GB limit is shared for any code, package, artifact, … doesn’t matter if it’s public or private.
  • On GitLab, the 50,000 CI minutes apply only after you qualify for the Opensource program. Otherwise you get the 400 minutes.

With GitLab, if you projects will be storage intensive then you will hit the 5GB limit pretty quickly.

GitLab self-hosted runner is a big plus if you can run CI on your laptop or other cheap place, as mentioned, it means unlimited CI.

Another plus on GitLab is better project management (issues, epics, …).

3 Likes

Thanks a lot for the clarifications. You made it very clear and I’ve been following the tutorial on setting up runners on my local device. In this case the code is still hosted on GitLab but I will run the pipelines on my local device which is a great solution for CI. Storage limits still apply and for some projects it is fine.

Choosing between GitHub and GitLab depends on your specific needs and preferences. While both platforms offer Git repository hosting and collaboration features, GitLab provides some unique advantages that might make it the right choice for you:

  1. Open Source and Self-Hosting: GitLab is open-source software, allowing you to host it on your own servers. This provides full control over your repositories, enhancing security and customization options. If you prefer self-hosting, GitLab offers more flexibility.

  2. Integrated CI/CD: GitLab comes with built-in Continuous Integration and Continuous Deployment (CI/CD) tools, enabling automated testing and deployment workflows directly within the platform. This integration streamlines the development lifecycle, enhancing efficiency.

  3. Scalability: GitLab offers robust scalability options, making it suitable for both small teams and large enterprises. Its features can be tailored to accommodate the needs of diverse projects, from startups to complex corporate initiatives.

  4. All-in-One Solution: GitLab provides a comprehensive set of features, including issue tracking, code review, wiki, and more, all integrated into a single platform. This consolidation simplifies collaboration and reduces the need for multiple tools, enhancing productivity.

  5. Community and Support: GitLab has an active community and extensive documentation, making it easier to find solutions to common issues. Additionally, GitLab offers various support plans, ensuring assistance is available if you encounter challenges.

  6. Transparent Development: GitLab operates transparently, allowing users to see the development roadmap, contribute to discussions, and suggest features. This openness fosters a sense of community and collaboration among users.

Ultimately, the choice between GitHub and GitLab depends on your specific project requirements, team preferences, and whether you value features like self-hosting, integrated CI/CD, and a unified platform. Evaluate your needs carefully and consider experimenting with both platforms to determine which aligns best with your workflow and objectives.

Thanks for your response. Aside from the first point, I feel that GitHub also provides all the features that you have mentioned. I was looking at differences and specifically advantages. Thanks anyway

is this chatgpt generated?! :slight_smile:

3 Likes

Why choose? :slight_smile: You can use both GitHub and GitLab. Personally, I take issues and MR on GitLab, then push on GitHub. Currently, GitHub is still way better when it comes to visibility and discoverability of your projects (I’m working on fixing that ^^), but it’s a closed source project with all the limitations that go with that. Don’t ask how it works, it’s a secret!

You didn’t specify, what kind of developer are you? If you do ruby, javascript, or any kind of webdevelopment, working with a tool that let you look inside how it works or even let you tweak it is priceless, especially if you’re a beginner (seriously, read code, lot of code, from real projects, and try to change some of them ; that’s what will make you level up fast).

hmm, that’s an interesting take. If I have a repo in both locations, there might be issues and PR / MR from both places. Handling that for a personal project would be difficult for me. There might be tools for merging issues and MR from multiple repositories but would that be a worthy time investment? I think not so an apples vs oranges comparison is a must for me. Right now I’m thinking releases would be duplicated to GitHub and code only in GitLab. Issues will be in 2 places but code will be in 1 at least this way.

I need a few weeks before I start working on something though. Thanks for your answer.

For issues, what I do is to deactivate them in GitHub (that’s an option in repository settings) and to add a note in README to direct people to GitLab (like this: GitHub - oelmekki/sl1toctb: Convert prusaslicer's sl1 files to chitubox' ctb v4 ones. )

You can’t deactivate pull requests, but that’s not a problem anyway. Unless you make an incredibly popular project, pull requests will be so rare it won’t bother you where they come from. It can be misguiding when you look at your favorite FOSS projects, making you think publishing FOSS will get you lot of contributions - this is the exception, not the rule, we’re mostly alone on our island. :slight_smile:

The one thing that requires a bit of setup in this solution is the mirroring. I think I’ve read there’s an option for that in GitLab, to push changes to GitHub automatically. Personally, my source of truth is neither GitHub nor GitLab, but bare repositories on my laptop (ideal for backups and local deployment), so I just use post-update git hooks to propagate my changes to GitHub and GitLab (and local network) when I push on it.

1 Like