0% found this document useful (0 votes)
164 views

Git Tutorial

This document provides an overview of Git and GitHub. It explains that Git is a widely used open-source version control system that allows developers to work collaboratively in distributed teams. Key features highlighted include Git being distributed, secure, fast, and supporting non-linear development through branching and merging. The tutorial also covers basic Git concepts and commands for both command line and GitHub use.

Uploaded by

Sneha Dhamija
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
164 views

Git Tutorial

This document provides an overview of Git and GitHub. It explains that Git is a widely used open-source version control system that allows developers to work collaboratively in distributed teams. Key features highlighted include Git being distributed, secure, fast, and supporting non-linear development through branching and merging. The tutorial also covers basic Git concepts and commands for both command line and GitHub use.

Uploaded by

Sneha Dhamija
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Git Tutorial

Git tutorial provides basic and advanced concepts of Git and GitHub. Our Git tutorial is
designed for beginners and professionals.

Git is a modern and widely used distributed version control system in the world. It is


developed to manage projects with high speed and efficiency. The version control
system allows us to monitor and work together with our team members at the same
workspace.

This tutorial will help you to understand the distributed version control system Git via
the command line as well as with GitHub. The examples in this tutorial are performed
on Windows, but we can also perform same operations on other operating systems
like Linux (Ubuntu) and MacOS.

What is Git?
PlayNext
Unmute

Current Time 0:00

Duration 18:10
Loaded: 0.37%
 
Fullscreen
Backward Skip 10sPlay VideoForward Skip 10s
Git is an open-source distributed version control system. It is designed to handle
minor to major projects with high speed and efficiency. It is developed to co-ordinate
the work among the developers. The version control allows us to track and work
together with our team members at the same workspace.

Git is foundation of many services like GitHub and GitLab, but we can use Git without
using any other Git services. Git can be used privately and publicly.

Git was created by Linus Torvalds in 2005 to develop Linux Kernel. It is also used as an
important distributed version-control tool for the DevOps.

Git is easy to learn, and has fast performance. It is superior to other SCM tools like
Subversion, CVS, Perforce, and ClearCase.

Features of Git
Some remarkable features of Git are as follows:

o Open Source
Git is an open-source tool. It is released under the GPL (General Public License)
license.
o Scalable
Git is scalable, which means when the number of users increases, the Git can
easily handle such situations.
o Distributed
One of Git's great features is that it is distributed. Distributed means that instead
of switching the project to another machine, we can create a "clone" of the entire
repository. Also, instead of just having one central repository that you send
changes to, every user has their own repository that contains the entire commit
history of the project. We do not need to connect to the remote repository; the
change is just stored on our local repository. If necessary, we can push these
changes to a remote repository.

o Security
Git is secure. It uses the SHA1 (Secure Hash Function) to name and identify
objects within its repository. Files and commits are checked and retrieved by its
checksum at the time of checkout. It stores its history in such a way that the ID of
particular commits depends upon the complete development history leading up
to that commit. Once it is published, one cannot make changes to its old version.
o Speed
Git is very fast, so it can complete all the tasks in a while. Most of the git
operations are done on the local repository, so it provides a huge speed. Also, a
centralized version control system continually communicates with a server
somewhere.
Performance tests conducted by Mozilla showed that it was extremely fast
compared to other VCSs. Fetching version history from a locally stored
repository is much faster than fetching it from the remote server. The core part
of Git is written in C, which ignores runtime overheads associated with other
high-level languages.
Git was developed to work on the Linux kernel; therefore, it is capable enough
to handle large repositories effectively. From the
beginning, speed and performance have been Git's primary goals.
o Supports non-linear development
Git supports seamless branching and merging, which helps in visualizing and
navigating a non-linear development. A branch in Git represents a single commit.
We can construct the full branch structure with the help of its parental commit.
o Branching and Merging
Branching and merging are the great features of Git, which makes it different
from the other SCM tools. Git allows the creation of multiple branches without
affecting each other. We can perform tasks like creation, deletion,
and merging on branches, and these tasks take a few seconds only. Below are
some features that can be achieved by branching:
o We can create a separate branch for a new module of the project,
commit and delete it whenever we want.
o We can have a production branch, which always has what goes into
production and can be merged for testing in the test branch.
o We can create a demo branch for the experiment and check if it is
working. We can also remove it if needed.
o The core benefit of branching is if we want to push something to a remote
repository, we do not have to push all of our branches. We can select a
few of our branches, or all of them together.
o Data Assurance
The Git data model ensures the cryptographic integrity of every unit of our
project. It provides a unique commit ID to every commit through a SHA
algorithm. We can retrieve and update the commit by commit ID. Most of the
centralized version control systems do not provide such integrity by default.
o Staging Area
The Staging area is also a unique functionality of Git. It can be considered as
a preview of our next commit, moreover, an intermediate area where commits
can be formatted and reviewed before completion. When you make a commit,
Git takes changes that are in the staging area and make them as a new commit.
We are allowed to add and remove changes from the staging area. The staging
area can be considered as a place where Git stores the changes.
Although, Git doesn't have a dedicated staging directory where it can store some
objects representing file changes (blobs). Instead of this, it uses a file called index.

You might also like