GitLab is one of America's fastest-growing private software companies, posting huge gains in 2021. The company provides a central server that manages Git repositories and is used to simplify the administration tasks of many corporations worldwide. According to Wikipedia, GitLab has over 100,000 users and is used by large, well-known organizations such as IBM, Sony, Goldman Sachs, and NASA.
But before we answer “what is Gitlab,”, let's first gain an understanding of its relevance by looking at a use case.
Goldman Sachs Group, Inc. is a multinational investment bank and financial services company, providing services in investment management, securities, asset management, prime brokerage, and security underwriting. The organization has offices in many major financial centers around the world and operates with over 38,000 employees.
Even huge organizations like Goldman Sachs face unique issues and obstacles. Some of the most significant challenges recently faced by Goldman Sachs were:
- To increase software quality and developer efficiency, enable concurrent development activities, and achieve faster development cycles.
- To find a tool that could remove toolchain complexity and manage everything in one user interface (UI).
GitLab to the rescue!
GitLab helped the engineering teams remove toolchain complexity and accelerate DevOps adoption. It enabled the team to develop an application that allowed Goldman Sachs' developers to manage all efforts with one UI and simplified the administration by employing one centralized instance for all repositories.
Now that you've seen one example of GitLab's applicability, let's focus on its basics. To best grasp GitLab's fundamentals, we must begin by understanding the "Git" part of the name.
What is Git?
Git is a version control system used to track changes in computer files. Git's primary purpose is to manage any changes made in one or more projects over a given period of time. It helps coordinate work among members of a project team and tracks progress over time. Git also helps both programming professionals and non-technical users by monitoring their project files.
Git can handle projects of any size. It allows multiple users to work together without having affecting each other's work.
Now that we have a better understanding of what Git is, let's expand cast our net out further by looking at the hosting repository, GitLab.
What is GitLab?
GitLab is a web-based Git repository that provides free open and private repositories, issue-following capabilities, and wikis. It is a complete DevOps platform that enables professionals to perform all the tasks in a project—from project planning and source code management to monitoring and security. Additionally, it allows teams to collaborate and build better software.
GitLab helps teams reduce product lifecycles and increase productivity, which in turn creates value for customers. The application doesn't require users to manage authorizations for each tool. If permissions are set once, then everyone in the organization has access to every component.
Customers can opt for the paid version of GitLab if they want to access more functionalities. For example, the Premium version costs $19 per user/month.
What is GitLab: History of GitLab
GitLab was originally a fully free and open-source software distributed under the MIT License. It was split into two distinct versions - GitLab CE (Community Edition) and GitLab EE (Enterprise Edition) in July 2013. GitLab EE was set under a restricted license, but the source code remained publicly visible, whereas the GitLab CE licensing model remained unchanged. In 2017, GitLab announced that their code would become fully open-sourced under an MIT License.
Why Use GitLab?
The main benefit of using GitLab is that it allows all the team members to collaborate in every phase of the project. GitLab offers tracking from planning to creation to help developers automate the entire DevOps lifecycle and achieve the best possible results. More and more developers have started to use GitLab because of its wide assortment of features and brick blocks of code availability.
Let's have a look at a demo to better understand the basics of GitLab and its functionality,.
Learn the basics of Git VCS and understand how to setup Git in your system with the Git Training Course. Check out the course now.
GitLab Tutorial Demo - Making Your First Project in GitLab
To answer “what is GitLab,” a demo is always helpful.
Log in to your account.
After logging in, create a new project.
Choose a name, a description, and whether you want it to be private or publicly visible.
Open your Git Bash
For the first step, to configure your user name and email ID.
To configure, use the following commands:
Git config --global user.name "tutorial"
Git config --global user.email firstname.lastname@example.org
Then, create the first repository.
To create a repository in the working directory, use the following commands:
Now you can navigate to this repository, using the following command:
After navigating to this folder, you will find that the folder is currently empty.
Now it's time to initialize a git repository. To initialize a repository, use the following command:
You will notice that something called the "master" appears on the screen. Whenever a Git repository is created for the first time, it creates a branch, and it's called the master.
Navigate to the folder, and find the hidden ".git" folder.
If you check the folder, you can see several directories and configurations. Make sure you don't make any changes to any of the directories.
This is created when a repository is initialized.
Now, create a notepad for the repository. Later on, you can push that file onto the GitLab repository.
To create a notepad, use the following commands:
Notepad will appear on the screen. Type anything inside it, then save and close it.
The next step is to check the status of the file.
This shows that there isn't a file committed yet, and there are untracked files. The untracked files can be seen in red.
Now, add the file to the staging area with the following command:
The next step is to commit the file. To commit, use the commit command.
git commit -m "input"
Recheck the status of the file.
You'll notice that there are no more commits to be made, as there was a single notepad, and that was committed in the previous step.
Now, it's time to push the notepad onto the GitLab repository.
To accomplish this, go to your GitLab and copy the git remote origin command, as shown below.
After you have done this, go back to your Git Bash and paste the command.
Now use the remote command, followed by the push command, to push the file to the remote repository.
git remote -v
git push -u origin master
Now go to your GitLab and check to see if there are any additions to the new project you initially created.
You can see that the notepad appears there. You can now open and check the contents of the notepad.
Enroll in DevOps Engineer Masters Program and learn to work on tools like Docker, Git, Jenkins, Puppet & Nagios.
GitLab has a rich reserve of Git repository along with several additional features. Here are some of the key features of GitLab:
- It allows powerful CI/CD pipelines
- It has an in-built registry that can be deployed instantly without any configurations
- It can be perfectly integrated with Kubernetes
- It can import enormous projects and also export other codes in the project
GitLab Offers several critical advantages for developers. Here are some of the most important advantages of Gitlab:
- Very easy to set up
- User-friendly UI and tools
- Allows an unlimited number of free private repositories
- Can integrate many APIs and third-party services
- Has very reliable uptime
Of course, like any other tool available today, GitLab comes with its own share of disadvantages such as:
- The UI can be a bit complicated for reviewing
- The tool itself has a few bugs which can make it a bit sloppy
We hope this tutorial has helped you understand GitLab’s relevance. Through this article, you have learned the basics of Git and its remote repository, GitLab. By the end of this what is GitLab tutorial, you saw how GitLab works, thanks to the hands-on demo.
Want to Learn More?
If you want to kickstart your career in DevOps, check out our DevOps Engineer Master's Program today. In this comprehensive program, you will learn about all the concepts, tools, and techniques to become a certified DevOps professional—a job role that is high-demand in today's fast-paced digital world.