0% found this document useful (0 votes)
40 views19 pages

Git Basics-Session-1

Git is a version control system that allows tracking changes to files. It offers advantages over local and centralized version control systems such as allowing file sharing and collaboration between developers. The document outlines how to set up an initial Git repository and clone an external one. It also describes basic Git commands and concepts like tagging commits.

Uploaded by

Vivek Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views19 pages

Git Basics-Session-1

Git is a version control system that allows tracking changes to files. It offers advantages over local and centralized version control systems such as allowing file sharing and collaboration between developers. The document outlines how to set up an initial Git repository and clone an external one. It also describes basic Git commands and concepts like tagging commits.

Uploaded by

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

TOPIC: GIT BASICS

WE ALL DID THIS AT LEAST ONCE …


WHAT IS VERSION CONTROL?

VC, also known as source control, is a software that tracks


and manages changes to files over time. Allows revisit
earlier versions of the files, compare changes between
versions, undo changes, etc.

Main features:
• Track changes across multiple files
• Compare versions of a project
• “Time travel” back to old versions
• Revert to a previous version
• Collaborate and share changes
• Combine changes
LOCAL VERSION CONTROL SYSTEM

A local version control system is a local database located on your local


computer, that keeps all the changes to files under revision control.
One of the most popular VCS tools was a system called RCS, which is
still distributed with many computers today.
RCS works by keeping patch sets (that is, the
differences between files) in a special format on disk; it can then re-
create what any file looked like at any
point in time by adding up all the patches.
Disadvantages:
• If anything were to happen to the local database, all
the patches would be lost.
• If anything were to happen to a single version, all
the changes made after that version would be lost.
• Collaborating with other developers or a team is
very hard or nearly impossible.
CENTRALIZED VERSION CONTROL SYSTEM

A centralized version control system has a single server that contains all
the file versions. This enables multiple clients to simultaneously access
files on the server, pull them to their local computer or push them onto
the server from their local computer. This way, everyone usually knows
what everyone else on the project is doing. Administrators have control
over who can do what.
Examples of CVCS are TFS (Microsoft Team Foundation) and
SVN.
Disadvantages:
• If the main server goes down, developers can’t save
versioned changes
• If the central database is corrupted, the entire history
could be lost (security issues)
• Slow speed delays development
INITIAL GIT SETUP: INSTALL GIT

In case git is not installed, download GIT according to your OS


here:
https://git-scm.com/downloads
GIT TAG

Git allows to tag specific moments in


commits history as important. As a rule,
tags are used for identifying version issue
moment.

Tags can be of 2 types:


• Annotated – user information, date etc
are stored
• Lightweight – only tag name is stored
SUMMARY

Apply the commands for initialization of Git Repository

Apply the commands for Clone the external Git Repository

You should have a basic understanding of what Git is and how it’s different from
any centralized version control systems you may have been using previously.

You should also now have a working version of Git on your system that’s set up
with your personal identity. It’s now time to learn some Git basics.

You might also like