Basics of Git

Β·

2 min read

If you are learning code then, one day you will surely encounter with Git. You must have heard about some fancy terms from the experienced programmers which have made you think that what it these terms ? and , will I be able to learn it ? Let me start with very basic, hope it will make sense.

What is version control system ?

A version control system records the changes made to our code over time in a special data base

Git is a most popular distributed version control system in the world. A version control system records the changes made to our code over time in a special data base which is called "Repository". We can check our project history to know that who has made the changes in the code and when these changes were made and why ? and if someone does the mistake in the code we can easily revert our project back to an earlier state. It is a open source, free and scalable in which anyone can contribute.

You can use the git from the command line and lots of code editors have this feature of running this. You can use the git bash to use it.

How to install the git ?

We need to install the git to start using this. Please click the link to download it Download Git for windows and Download Git for Mac

What is git repository

Git repository tracks and save the history of all changes which are made to the file in a git project. It saves the data in .git directory which is also known as repository folder.

Git status

This command is used to check whether the git has initialized on the current folder or not .

$ git status

Git init

If You want to make your locally saved file/folder a git repository then you need to initialize this command.

$ git init

Set the "git user name and email"

You need to set the user name and email to proceed further.

$ git config --global user.name "Your name"
$ git config --global user.name "Your email"
Β