Hi everyone, in this blog “Introduction to git features and commands ” we’ll learn about some important git commands which we use in our daily working life, and without using these commands we won’t be able to work with the team on same code base in parallel.
What is Git?
Generally Git is the most widely used version control system these days in the world. Linus Torvalds created it in 2005, a great technology expert and creator of Linux operating system.
The design of this Version control system is in such a way so that it can handle small as well as large projects with great speed and efficiency.
It is very popular among developers because it is an open-source software and can easily perform on various projects.
Some Features of Git-
Open-source:

It is free and open-source version control system.
It is open-source because it provides the freedom to modify the code according to developer’s need.
Also it allows multiple people to work on the same project and cooperate with each other very efficiently.
It is designed in such a way that it can handle small and large projects with an ease.
Unlike other Version Control Systems which provide paid functionalities like accuracy, code privacy etc. It is totally open- source and brings these functionalities to user in much better way.
Distributed System:



Systems which allows the users from all over the world to work on the same project are known as distributed systems.It holds a central repository which can be accessed by remote users using version control system.
When a user complete their part of work, they push the changes to repository and the changes get update in the local copy of every user who download the latest snapshot of project.
Branching:



Branching is a feature in git which helps users to work in a line that runs parallel to the main project file. These lines are Branches, we can test any new feature upon these branches and further, it can be merge with the master branch.
Secure:
It maintains all the records which user commit to the local repository.
It pushes a log file to the central repository each time a push operation is perform by user
Compatibility:
In terms of compatibility it is compatible with most of the operating systems present these days.
It also allows users to access the repositories of other version control system which is a great feature in itself.
Lightweight and lossless compression:
It stores all the data from the remote repository to the local repository while cloning is completed, there may be lots of developers working on the same project, hence the repository data might be huge.
Cloning that much data might result in system failure but git has already taken care of such problem
Some common Git commands–
git init:
This command creates an empty repository inside a directory, it is the initial step of creating a repository.



git add:
It adds files to the staging area, only after git add command the file is available for commit to repository.



git commit:
This command keeps track of the changes made to a local repository.
Each commit has a unique ID and each commit includes a message so that it can describes the changes made in a commit.



git status:
It displays the state of working directory and staging area,It lets the user see the changes staged in the repository.



git branch:
It tells about what branch the local repository is on, and also lets you create, rename, delete branches.



git checkout:
The function of this command to switch branches so that we can work on some other branch and this command operates upon three entities which are files, commits, and branches. Sometimes this command can be dangerous because there is no undo option available on this command.



git clone:
This command makes a copy of existing repository to your local system, cloning is a process of creating identical copy of a git remote repository to the local machine.



git pull:
This command pulls the changes from remote repository to your local computer, it fetches and download the content from a remote repository and immediately update the local repository.



conclusion-
In this blog we learned about git features and some common commands that will help a lot of new learners, we talked about why git is one of the best version control system and how easily it can handle different kind of projects.