An article cover image

What is the GIT?

Ufuk Taş
5 min readFeb 11, 2023

--

Git is a version control system commonly used by software developers to manage and track changes in their projects. Git allows multiple developers to work on the same project at the same time, while avoiding conflicting codes in projects. Git is a directory or repository where the project stores all its information (such as source code, date, metadata). The git repo can be local (stored on your computer) or remote (stored on the server). Git also offers features such as “commit” snapshots that save the changes and create the history of the project, separate development branches called “branch”, which makes it easier for multiple developers to work on the same project at the same time, and “merge”, which is used to integrate one branch into another. Using Git, developers can effectively manage and monitor changes in their projects.

If we talk about the short history of Git;

During the development of the Linux kernel, a version control system called “Bitkeeper” was used for improvements, patches, etc. This usage was provided free of charge as Bitkeeper also supports it. However, later on, a problem arises between Linux developers and Bitkeeper administrators, and Bitkeeper cuts this support and makes these development stages more difficult by making use of it for a fee. Linus Torvalds and his team offer Git, an open source version control system, as a solution to this big problem.

Features such as Git being fast, having a simple design, making thousands of parallel branches (the process of developing the written code by others), having the capacity to host large project codes such as an operating system play a leading role in choosing this system.

Now let’s come to install Git on our computer.

Download screen image

Click here to download the Git version for your operating system and install it on your computer by following the necessary steps. A few simple basic settings are required after the initial installation. After making them, the version control system is ready to use. (These basic settings are some basic information for syncing with your Github repository using the Git version control system.)

Some of the key concepts in Git are:

Repository: A Git repository is a directory or a storage space where Git stores all the information related to a project, including its source code, history, and metadata. A repository can be local (stored on your computer) or remote (stored on a server).

Commit: A commit is a snapshot of the entire project at a particular point in time. It is a way of recording changes made to the project and creating a historical record of the changes. Each commit has a unique identifier, a message, and the author’s information.

Branch: A branch is a separate line of development within a Git repository. By default, every Git repository has a main branch called the “master” branch. Branches allow developers to work on different parts of a project simultaneously without affecting the main development line.

Merge: A merge is the process of combining two or more branches into a single branch. Merging is used to integrate changes made in one branch into another branch.

Staging area: The staging area is a temporary storage space where changes are accumulated before being committed to the repository. The staging area allows developers to review the changes before making a commit, ensuring that only the desired changes are committed.

Pull request: A pull request is a way of requesting changes made in one branch to be merged into another branch. Pull requests are used to initiate a discussion about the changes and to get feedback from other developers before making the changes permanent.

Remote repository: A remote repository is a Git repository that is stored on a server, making it accessible to multiple developers. Remote repositories are used to share code between developers and to store backups of the code.

Clone: A clone is a copy of a Git repository that is stored on a local machine. Cloning a repository allows developers to work on a copy of the code, making it easy to track changes and collaborate with others.

Advantages of using Git:

Distributed work environment: Git allows multiple developers to work on the same project at the same time. Developers can work separately by creating different branches and then merge their changes by doing a merge.

Historical snapshots: Git stores snapshots called “commits” that make up the history of the project. In this way, it is possible to access information such as the date of the changes made in the project and when they were made.

Tracking changes: Git keeps track of all changes made to the project by saving it. In this way, it is possible to access information such as why the changes were made and when they were made.

Quick and easy revert: Git allows you to easily revert erroneous changes made to the project.

Remote storage: Git allows you to store the project on the remote server as well. In this way, more than one developer working on the project can access the same data and share information about the project.

Disadvantages of using Git:

Learning curve: Go may seem a bit difficult and confusing at first. However, with more practice it will get easier to use.

Complex commands: Git offers many different commands and each of these commands is used for a different purpose. This may take some time and effort to learn to use Git.

Update issues: While Git offers remote storage, this feature can sometimes cause update issues. For example, multiple developers can update the same file at the same time.

Risk of data loss: Git ensures that data is stored securely, but there may be a risk of data loss due to misuse. For example, if the data is deleted incorrectly, the data may not be recovered.

In conclusion, Git is a powerful tool that helps developers manage the development of their projects. By understanding these key concepts, developers can take advantage of Git’s features and use it to efficiently manage and track changes in their projects.

In this post, we talked about the basics about git. In our next article, we are talking about the most used commands of git and github.

--

--

Ufuk Taş
Ufuk Taş

No responses yet