When a novice developer takes the first steps in programming, sooner or later he will be offered to create an account on the GitHub service. This is an online service for version control systems (VCS) in software development. Let’s talk about RMS, the service GitHub and why programmers need it.
Git is a system of version control in software development. It was invented by Linus Torvald, the creator of the Linux operating system. He needed it in order to organize the work of programmers with the open-source code of his operating system, but it turned out that it is needed in almost any work with the code.
The version control system allows you to consistently save all the code changes you make during your work. If a developer encounters a problem after an update, he can easily roll the code back to a working version instead of spending hours looking for an error.
In addition, and this is the main task, with the help of the RMS multiple programmers can work on one project. Version control allows you to keep track of what changes were made, by whom, and when, and roll back changes if there are problems.
Accordingly, Git is a distributed CMS that allows developers to work together on the same project and track changes to files. Git has many advantages: speed, ease of use, clear design, support for non-linear development (branching) and efficient handling of large projects. Git is also a free, open-source project, which has helped it gain a leading position in the market.
Git practices its own approach to data preservation. Other VCSs display system files as a list of changes, while Git takes snapshots or snapshots, and keeps links to them.
Types of Version Control Systems
There are three types of VCS: local, centralized and distributed.
Local version control system
In a local system, each developer changes their computer. During the commit process, the system copies the files with changes (patches) and stores them in a new directory. Changes are made to the system as a set of patches, ready by a specific date and time. If a problem occurs, the patch set can be rolled back completely or partially to restore the previous version.
Centralized version control system
In a centralized system, all versions of files are maintained on a single server. Clients access the file on the server, work with it, and then return it to the server.
The main problem with the centralized system is that in case of a problem on the server the project will be paralyzed and all the data can be lost.
Distributed version control system
A distributed version control system fixes the drawback of centralized VCS. When a client accesses files on the server, it copies the entire contents of the repository. So, in case of problems on the server, a backup can be downloaded from any copy of the client.
And in a distributed system, the client can also access multiple servers. This is how developers can work on several projects at the same time.
Now you know what Git is, how it’s used for version control, and which DLCs exist. Now, let’s move on to how GitHub works and why it’s needed.
What GitHub is
GitHub is an online service that has all the features of the Git system. If Git is a tool, a repository that can be downloaded from the source site and used locally on your computer, then GitHub is a specific resource where you can create or download a repository and use it to collaborate remotely.
After registration on the service GitHub developer can work on one or more projects, manage changes in the source code, track bugs, set up access to their projects
In addition, GitHub has a Wiki for each project (which most programmers are too lazy to fill, and in vain), a system of task management, integration with popular services, and even emoticons. GitHub looks more like a social network for programmers, although formally it is not.
GitHub repositories are needed to store files, folders, and other resources needed to work on a project. Every developer can upload a repository to GitHub and manage it through a command line interface.