github vs gitlab

GitHub or GitLab?

18.11.2020

Git is a version control system created by Linus Torvalds, the creator of the Linux operating system. Learning how to work with Git is very important because 99% of companies use Git – GitHub or GitLab platforms. If we talk about the advantages of Git for programmers, it is important to touch on the following topics.

 

1) Version control system

 

This ensures that software codes are stored on the internet. Storing projects in the computer's internal memory is considered dangerous for a programmer. Why? Because any technical malfunction in the computer can result in the deletion of all codes. Thanks to Git's versioning feature, it is possible to revert to previous versions of the project at any time.

 

2) Work as a team

 

Working on a project as a team in a work environment is one of the common situations. Git makes this easy too. It provides the process of several people working on the same project as a team, merging codes, and determining the latest version.

 

3) Can be used offline

 

It is possible to work on projects stored on a computer even without an Internet network, because Git stores a copy of the project on the local machine.

 

4) Being open source (Open source)

 

It should also be emphasized that there is no charge to use these benefits.

 

There are two most popular platforms for working with Git - GitHub and GitLab. Along with the peculiarities that distinguish them from each other, there are also common aspects.

 

GITHUB

Positive aspects

 

Ability to create a repository of the project on the Git server for the open source code base

A user-friendly interface

Large number of users and community support

Pull polls and comment features

Easy setup, monitoring and control features

 

Negative aspects

 

It does not provide good API integration

Charges for private repositories

It has fewer features

 

GITLAB

 

Positive aspects

 

A convenient platform for open source code base

A user-friendly interface

There is no charge for private repositories

Allows you to create any number of personal repositories

Easy setup

Enables API integration

CLI user experience

CI supports the CD lifecycle

Pull requests and code review features

Negative aspects

 

Small number of users and community support

 

 

Now let's briefly talk about the commonly used and important Git commands that you should know.

 

git clone – used to copy any repository on GitHub or GitLab servers.

 

git init – make the project a git repository and create a folder with a .git extension. This makes the directory ready to push to the Git server.

 

go add – adds all or new files in a folder.

 

git commit -m "Initial commit" - allows you to record a statement about new changes made to the code.

 

git pull – with this command we can replace the local repository with the latest version on the Git server.

 

git push – used to push the project to the Git server.

 

git status – we can get information about changes in the repository.

 

git checkout – we can revert the changes in the repository.

 

git ignore – if there are files that you don't want to be sent to Git (files that store database data, email or passwords), you name them here by creating a .gitignore file. So those files will not appear in the repository.

 

We share with you the book "Pro Git" written by Scott Chacon and Ben Straub for you to get in-depth knowledge of Git. The book has been translated into Azerbaijani. You can use the book for free by clicking on the link below.

 

https://git-scm.com/book/en/v2

 

You can also see ATL Academy students' projects on Git.

 

https://gitlab.com/atl_academy

Other posts

Let's make an appointment

Fill out the form to register at ATL Academy, answer your additional questions, and we will contact you by phone.