Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Git - Version Control System

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

Git-

Version Control System


By- Mahendra Kumar
AI Technologies
m.kr@outlook.com

History

Linux uses version control system to develop Linux OS as its developers are spread
all across the world.
In 2005 - Previous Linux kernel development tool, BitKeeper, revoked free service.

Creator of Linux, Linus Torvalds begins to develop own method, with the following
design goals:
o

Speed

Simple Design

Strong Non-linear Development Support

Fully Distributed

Suport for Large Projects

Introduction
Git is afree and open source distributed version control system designed
to handle everything from small to very large projects with speed and
efficiency.
Version control is a system that records changes to a file or set of files
over time so that you can recall specific versions later.

Need for version control


A group of people start working on a project and they all are working
simultaneously. It is very important to keep track of all the changes
made otherwise one person may corrupt other persons work.
Some changes in the project may go haywire which should be recalled as
soon as possible.
Social coding: Helps in managing team spread across the globe.

Installation
Git can be downloaded from the official GIT website:
http://git-scm.com/downloads
Once installed no further configuration is required.
Git is basically a command line utility but can be used in GUI form via
other IDEs eg: Eclipse, Brackets, Code

First Use
When using for the first time it is required to provide information so as
to manage user profile while editing code. This is required only once.

Command:
git config --global user.name Mahendra"
git config --global user.email m.kr@outlook.com

Creating a repository
Use cd to move to the directory where you are working.
Type in git init
This creates the repository. A hidden directory named .git in the same
folder
Type in git add .

( dot in the end means all the files )

Type in git commit m "Initial commit"

Copying/ cloning repo. From


other sources
Git can be used to clone repositories available online or in a different location in
the same computer.
Syntax: (Italic part should be replaced by the URL of the git repository
git clone URL
git clone URL mypath
These make an exact copy of the repository at the given URL
git clone git://github.com/rest_of_path/file.git

Commit
git add newFile1
Committing makes a snapshot of everything being tracked into your
repository
A message telling what you have done is required
git commit m another change

Social Coding
git pull remote_repository
Get changes from a remote repository and merge them into your own
repository
git status
Git shows the changes you made.
Work on the files.
git commit m Name of the change you made
git push

References:
1.
2.

http://www.git-scm.com/
https://try.github.io/levels/1/challenges/7

3. Documentation: http://www.git-scm.com/doc

You might also like