Introduction to GitLab

What is GitLab, what makes it different from its competitors like GitHub or Bitbucket and what tools does it include, in addition to Git remote repositories, to manage development projects.

GitLab was born as a hosting system for Git repositories, that is, a hosting for projects managed by the Git version system. However, many other very interesting tools for programmers and development teams have emerged around this tool, which involve the entire flow of development and deployment of applications, tests, etc.

Undoubtedly, to give an idea of ​​what GitLab is, the quickest thing to do would be to compare it with one of its competitors, GitHub, since the latter is especially well-known in the world of software development. We are all more or less familiar with what it offers, repository management, issues, pull requests, GitHub Pages, etc. GitLab would be something very similar to what we find on GitHub, although sometimes with other names. Other program or service alternatives to Git like Bitbucket lag far behind in capabilities.

Although GitHub is a monster, in terms of number of repositories and functionality, GitLab has managed to go even further, offering a broader set of services that will delight not only developers, but also devs.

Install on your server or use as a web service

The main difference between GitLab and its competitors is that GitLab is offered as free software that you can download and install on any server. This possibility allows to use GitLab for a company, professional or organization in its own servers, without any additional cost.

Note: Obviously, if you install your own GitLab to use in your own company, it forces you to maintain the server, configure it, update the software, etc. Work that does not stop representing an expense of time, which in the end translates into money. It is the reason why many companies prefer to end up paying to enjoy GitLab as a service.

The other alternative is to use GitLab directly from , paying for the service. This allows you to have all the power of GitLab and its neighboring tools, without investing time in configuration, taking advantage of its advantages from the first minute. In addition, the “cloud” versions of the service have many additional tools, functionalities that far exceed the version offered to install as free software.

Finally, GitLab is also offered free of charge to publish free software repositories, just like its competitor GitHub. In this case, although GitLab may have some extra services that justify working with the tool, the truth is that GitHub is still the preferred place to locate a project, since various dependency management systems, such as npm, Composer, etc. They work directly against them.

Note: For those who want to take advantage of GitLab in a project published on GitHub, there is the possibility of mirroring the repository. GitLab, every time the repo is updated on GitHub it is able to pull the changes. Developers from GitLab, with the repository always updated, can make use of extra services, such as continuous integration or continuous deployment processes.

In summary, if we want to use GitLab for free, to remotely host a Git repository in general, the best alternative is to install it for free on one of our machines. However, if we want to save time and don’t mind paying a bit, the cloud version is much more complete and allows us to forget about the service and focus on developing our programs.

How to use GitLab

GitLab is a Git-based tool, which you use in the same way as any other similar tool. You generally use Git through the command line, or through GUI programs, or the code editor itself. All those operations that you already know and that we have explained in , do not change.

In addition to remote hosting for repositories, GitLab offers a web interface to control the repository and many other tools. It offers the possibility of examining the code in any of its versions, performing actions related to the repository system such as merging project version code or managing “pull requests” (which in GitLab are called “merge requests”), managing problems of your diverse software, automate processes such as the deployment or execution of software tests, etc. All this operation is carried out, or configured, in GitLab through a website.

Therefore, to use GitLab you simply need the same tools that you already use in your day to day, the terminal or a graphical interface program to manage your repository, as well as the web browser to access the ecosystem of tools available on the GitLab site. GitLab. Of course, you can use all these tools from any computer connected to the Internet, regardless of its operating system.

Note: yes, if we refer to how to use our own installation of GitLab, and what we need to install free software on our own servers, the answer is that the most normal thing is that you install GitLab on a Linux server, since it is your environment natural. Generally, installing GitLab is as easy as installing any other software on Linux, except that you’ll also need to configure a series of additional programs, which GitLab uses underneath, for the service to work smoothly. This part may not be so easy for a person who does not have a solid knowledge of system administration.

GitLab Features

In GitLab we can mainly manage projects, Groups and Sinppets. Projects are the protagonists of the system, basically software repositories managed by GitLab and the entire GitLab ecosystem. Groups are basically companies and users. The snippets for their part are like pieces of code that you can leave to do anything.

As we say, within the projects is where most of the functionalities that we are going to summarize come together:

Overview:

It is a listing of the entire project, the files, the README.md. It is similar to what we see when we access a project with GitHub. It gives you the summary of the repository, files, commits, etc.

Then it has two subsections: In Activity of the project it offers you all the activity, in a statistical way. In Cycle Analytics it also offers you something very new, not available in other tools. Basically, it reports the time it takes to perform a feature, from when you have the idea to when it is incorporated into the software, so that anyone, even without programming knowledge, can know the time it took to do the tasks. A very valuable information that can help in the future to better estimate the work time necessary for new functionalities. Obviously, the more issues you have in the system, the more data you will have to know the time you need for the next tasks.

Repository:

Within the “Repository” section we have several different options that affect the project repository.

We have “Files”, where you can browse the directories and files, whose code we can see, and even edit the files. A view by branches is available and it has various utilities to be able to do things related to the remote repository, saving the need to launch commands. It has a very powerful file browser.

In “Commits” we find a list of all the commits made against the repository, along with specific data for each of them.

The branches “Branches” are used to see the branches that we have in the repository.

The next section, “Tags”, is also important, as it is the mechanism available in Git to define code status points, corresponding to each release.

In addition, this section has other important areas, which we leave you for your own investigation. The “Locked files” part would be especially noteworthy, available only in GitLab as a service, which is something that the Git version control system itself does not offer but that they have implemented within GitLab, which allows a file to be locked so that only certain people they can edit it.

issues:

This is another of GitLab’s great utilities, which allows you to define any problem that is detected in the software and track it. Surely we know them because it is one of the fundamental parts of GitHub and we will have navigated through them dozens of times.

Basically, it allows us to see the issues generated in a project, hold discussions about them, and control the workflows for their resolution, allowing us to define the people who must resolve it, the estimated and used time, the deadline, the weight of the tasks , etc.

In GitLab they have published another interesting innovation that is an issues board (Issue Boards), which allows you to visualize the tasks, in a similar way to the Trello boards. As managers we are able to define boards and labels. GitLab, through the management of the Issues, is able to update the status of the tasks, allowing to visualize their evolution through the boards.

Another very interesting thing is the “Service desk”, which offers you an email that you can provide to the client. Without the client registering in GitLab, nor having access to the project, they can send messages to that email, attaching text, images and files. GitLab, upon receiving the email, automatically registers an issue with that content.

Merge Request:

They are like GitHub Pull Requests. They allow you to control all requests to merge or merge code from different branches or forks. It is very important that merges are resolved through the graphical interface, since it offers us many interesting possibilities, such as test automation, the possibility of reviewing changes by team members, implementing various control policies on the project code , etc.

CI/CD:

It is one of the wonders that GitLab has, a simple and very useful tool for continuous integration and continuous deployment processes. There are many tools that can be integrated to automate processes and eventually create fully automated workflows. So that the tests are launched and if all goes well, a series of defined tasks can be carried out, which can lead to the automatic deployment of the applications.

Just having this section is reason enough to move to GitLab. It doesn’t reach the complexity of specific tools like Jenkins, but it solves similar problems very powerfully.

GitLab is much more

Gitlab does not stop here, there are dozens of tools to carry out a lot of processes, plugins, integrations with various useful services in the day-to-day life of…

See also  File upload with PHP
Loading Facebook Comments ...
Loading Disqus Comments ...