DEV Community

Cover image for What is Git and how does Git work?
Sahinur
Sahinur

Posted on

What is Git and how does Git work?

What is Git?

Git is a Source Code Version Control and Source Code Management System, an ideal system for storing version or revision control and version or revision of what code you wrote on your computer before and where you changed it later. Linus Torvalds designed and developed the Git for the Linux kernel in 2005. Like Linux under GNU General Public License, Git is also an open source and by far the most popular version control system for software development.

Why use Git?

Since Git is a Version Control Software, it can be easily controlled through any version of Git. Through Git, different developers can participate in the development of the same software, make changes, and a specific developer can finalize those changes. Since Git is a distributed version of the control system, it can also be used as a server. A dedicated Git Server software adds access control to a variety of features, including displaying Git repository content across the web and managing more than one repository. A big advantage of Git is that many developers can work on a project at the same time. You can work without internet connection if you want. Although Git was initially developed for Linux, it also supports other operating systems, such as BSD, Solaris, OS X, and Microsoft's Windows.

Before you start working on Git, you need to know about the most commonly used commands:

git init - Used to create a new repository.

git config -Git is used to set configurations.

git status -Check the current status of Git.

git add -Used to bind one or all files together in a repository.

git clone -Used to download complete data from a pre-existing repository.

git commit - Used to permanently attach work to an offline repository.

git pull - Used to download files from a remote repository and merge with an offline repository.

git log - Used to check the log of git.

git push - Used to upload files from offline repository to remote repository.

git branch - used to create new branches in the repository.

git checkout - Used to switch from master branch to another branch.

git merge - Used to merge one branch with another.

Git Installation and Configuration on Computer:

In order to start working with Git, you need to make your computer suitable for using Git. That's why you need to install Git on your computer. Let's take a look at how to install and configure Git on different OS.

Top comments (0)