In this post, I am going to walk you through how to get started with GitLab.

Git is the popular and standard version control system to handle simple to large projects, considering the speed and efficiency.

There are many service providers out there in the Market that offers repository management services based on Git. For ex: GitHub, GitLab, Bitbucket, Azure DevOps etc.,

I chose GitLab as topic of discussion here since I love the features it offers, from code management to continue integration to security features like Container scanning and more.

What is GitLab?

GitLab is a complete DevOps platform, where you can manage your code, build pipelines, configure security scanning to check vulnerabilities on packages/libraries used and a lot more.

In simple words, it’s a one stop shop to deal with DevOps and SecOps. But here, I am not going to dive deep into any of these, rather I will guide you to create free account with GitLab and start with initial setup to create your first project. In upcoming posts, I will write more on DevOps and SecOps related articles using GitLab.

All ready, let’s begin.

Create a FREE GitLab account

Sign up for FREE account using this link. You can create unlimited Private or Public repositories and also enjoy the FREE 400 minutes build time (for pipelines) per month with this FREE plan.

In my opinion, 400 CI/CD minutes is suffice to explore continuous integration and continuous deployment for your projects.

GitLab Signup

Create a new project

It’s time to create your first project in GitLab. You can either create blank project or pick one from the available templates.

GitLab Create New Project

Template projects are available for Spring, Android, Netlify and more. But I am going to choose blank project for sake of our discussion.

GitLab Create Blank Project

  • Enter your project name.
  • Enter project slug (Part of your project URL).
  • Add few lines about your project.
  • Set the visibility level to either Private or Public.
  • Check the checkbox if you want to create along with your project.
  • Hit the “create project” button.

A new project has been created. Let’s move on to next step.

GitLab Project Created

Clone the repository to your local

It’s time to clone the repository in your local machine.

You can clone the project in two ways: Using Https or SSH. I am going to show you how to clone it using Https.

  • Goto your GitLab project and look for “Clone” button in right hand side, you will see option for Https / SSH.
  • Copy URL for “Clone with Https”.

GitLab Clone Project

Okay, now you got the Https URL of your project. You need to clone it in your local machine using Git bash.

If you don’t have Git installed in your machine, please go ahead and install it now. Otherwise, follow below steps.

  • Open Git bash.
  • Run “git clone <URL copied from GitLab>”. Don’t use angular brackets while running this command.
  • It asks for Username and Password of your GitLab account. Enter them and boom, your repo is cloned to local repository.

GitLab Clone Project in Local

Play around README file

Open file, you should see your Project description.

Readme File before Update

Goto your remote GitLab repository, open and click “Edit” button.

GitLab Edit Button

Change the content of README file and click “Commit changes” button.

Edit README File

All right, now run this command “git pull” to pull the remote changes to your local repository.

README file before update

Yay! you will now see the changes you made to README file in remote is synched with your local repository.

Okay, I hope you now know how to create GitLab account, create repository and clone it to local machine. I’ll write more articles in upcoming days to play around GitLab features like CI/CD, GitLab pages and more.

If you have any questions or need more information on this post, leave a comment below, I’ll respond back at the earliest.

Join the Newsletter

Subscribe to get our latest content by email.
    We won't send you spam. Unsubscribe at any time.