If you are into DevOps you probably, at last, heard about GitLab. Like GitHub or Bitbucket, GitLab is a repository management platform powered by git superpowers. It provides developers with tools to monitor, test, and deploy code in the cloud. Getting to the point, it is a fantastic platform with a wide range of DevOps features. But before we are going into the hard stuff let’s answer a very important question first – what is a GitLab repository exactly?
Table of Contents
GitLab repository – an introduction
GitLab repository is a place where you keep your code and make changes to it. It’s a whole ecosystem that makes your programmer work so much easier. For instance, all changes are tracked with version control. Do you remember that we mentioned before git superpowers – that’s one of them. Another important fact, every new project created in GitLab contains also a repository. Which speed-up your work too.
Where does GitLab store your code?
GitLab offers two ways to store repositories. One of them is repository storage. In this case, the gitaly_address is pointing to the Gitaly node and thus provides high-level RPC access to all your repos. What good it does? For e.g. the git data can be read and written very easily. Another option is to save the repositories to your local computer, but this one is not recommended.
Let’s create your first GitLab repository
There are several ways to create a new repository in GitLab. Every time you create a new project, a new repository is also automatically created. You can also add a new project by hand. To do that go to the Top bar and click Project view. There is also a third option. A forking operation during which a new repository is also created.
How to make work done with GitLab repository
GitLab thanks to the git version control system – or git VCS in short – can truly do wonders to the speed of the project’s development process. There is a lot of tools and features you can use as a programmer. For start, you can run, manage, and trigger GitLab’s CI/CD pipeline, easily resolve any cross-link issues, and of course, merge requests. And if you use on a daily basis Visual Studio Code or PyCharm (or any other IDE provided by JetBrains) you could easily connect it with your GitLab organization, then clone the repository and maintain it on your local machine too.
GitLab also offers a project information page. It comes in handy when you need a quick check of the work done within a repository like a programming language used in a default branch, the size of files stored in your repos, etc.
Besides what we mentioned above, GitLab gives you a clear history overview. In other words, you can monitor on a regular basis which person made which changes to the code. It’s very simple. Just check the contributor graph or if you need much more detailed insight – the history graph.
GitLab repository and the security
Have you heard about the shared responsibility model? GitLab, like many SaaS vendors, is no different in this aspect. Its team goes to a great length to keep the infrastructure – thereby your projects and repositories – secure and accessible. But it’s not enough to say that your code is truly secure. There are responsibilities that you as a user have to complete too. Mainly, keeping backup copies of your code and GitLab’s metadata.
Therefore, you should look for a professional GitLab backup – https://gitprotect.io/gitlab.html. There are a few third-party solutions available – and for most instances, GitProtect.io with its 30-day free trial and lots of pretty useful features should be your first step. And if you are concerned about the cost, keep in mind that maintaining scripts will take up a lot of time and will not save you any real money.