Buse HIZARCI
4 min readDec 28, 2022

--

Before we start explaining what the GIT Control System is, let’s talk about the meaning of the word ‘git’ and the brief historical development of this system. So why are we doing this?

What is the GIT Version Control System? While looking for an answer to the question, instead of just getting basic information about this subject, we will begin from scratch to deep. Let’s not easily forget what we learned about GIT on this page and the following pages.

What is GIT? When you asked, you got the answer of the version control system. But what is a version control system? Can’t I just folder ‘project’, ‘project_1’, while developing my project? Without learning GIT? — NO.

What is a Version Control System?

Considering that more than one person works in the projects, it accelerates the development. While developing on the project, it allows us to compare our old and new code to understand where we are at. It allows us to revert to the old code record in cases where we encounter an error in the project. It facilitates the process in new projects to be developed based on open source projects.

GitHub

It is a code library and a kind of social media environment for programmers. My instagram ..

Software developers can keep their projects public or private. Paid and free package options are available. You can store your files and version control information in multiple places (distributed). Thus, you can access your files independently of the device. With the SS feature, you can record the current state of the project or files at any time by ‘commit’. This way, if you encounter a bug in the future, you can revert to any version at any time. You can specify files that you do not want to be versioned in the project. (like node_modules, .mp4, .log, .env).

GIT Basic Commands with GIT Bash

In order to use GIT basic commands, you need to open Terminal application on Mac OS X and GIT Bash on Windows and run the commands below.

Some terms we need to know;
untracked: Refers to newly created files that are not yet tracked by GIT.
unstaged: Files that have been updated but not prepared for commit.
staged: Indicates files that are ready to be committed.
deleted: It refers to files that have been deleted from the project but not removed from GIT.

**`git init`**

It is used to create an empty git repository in the directory of a project that is not yet under version control.

Git config

GIT has many configurations and settings, two of which are user.name and user.email. We use the following commands to configure these settings. When we first install GIT, the first error we usually get is because we didn’t make these configuration settings. Since the name and email you write here will appear when you commit to a platform like GitHub in the future, it is useful to name it deliberately. Also, as you can see, these settings are ` — global`, ie system-wide settings. We can change these settings on a project basis.

**`git add`**

It is used to send newly added or modified files to the **staged** environment.

go rm
It is a command that allows to untrack a file added to the Staged environment, that is, to make it untracked.

**git status**

It gives information about the current status of the project being worked on. Information such as changes made, added and deleted files are listed.

**`git commit`**

  • Commit* is the sending of files taken to **staged** environment to *Local Repository*. A best practice is to include a message describing the changes made during each save. In addition, each commit has a unique ID. In this way, you can revert to an old commit and you will not have any loss.

**`git log`**

  • It allows us to view the commit history in the project. All commits are listed with their id, author, date and message.

git branch
It is used to add, delete or list a new branch on local or remote repository.
To add a new branch to your project;

git checkout
It is used when we want to switch between branches or commits.
To switch to the existing branch;

git merge

It is used when we want to merge the changes in another branch with the current branch.

**`git push`**

It sends the commits we receive in our project to the remote repository.

As you can see, GitHub is a unique platform that offers many possibilities to developers. You can use GitHub on the web or download the desktop app. It should be noted that GitHub is a business management platform as well as a developer platform. For this reason, it has a very wide usage area. We especially recommend developers to take a look at GitHub.

Thanks
Buse

--

--

Buse HIZARCI

I am a self-taught front-end developer based in London. When I am not writing code, you will find me traveling or drinking coffee somewhere.