SlideShare a Scribd company logo
Presented By Organized By
Prabal Tyagi Rajeev Singh
Topics
• What is Git? How it is different from Github
• Difference between Git and other versioning systems
• Setting up Git on windows, mac and linux OS
• Setting up of Github Repository
• Git Commands
• GUI based tools for Git(SourceTree, Git GUI etc)
What is Git? How it is different from Github
Git is a free and open source distributed version control system , a tool
to manage your source code history.
Github is a hosting service for Git repositories, which offers all of the
distributed revision control and source code management (SCM)
functionality of Git as well as adding its own features like wikis, task
management, and bug tracking and feature requests for every project.
In brief, Git is the tool, and
Github is the service for projects that use Git.
You do not need GitHub to use Git.
Git = Local (on your computer), GitHub = Remote (web).
Github allows you to:
Share your repositories with others.
Access other user's repositories.
Store remote copies of your repositories (github servers) as backup of
your local copies.
Difference between Git and other
versioning systems
 What is CVS/SVN?
 Systems such as CVS, Subversion, and Perforce, have a
single server that contains all the versions files, and a
number of clients that check out files from that central
place. For many years, this has been the standard for
version control.
Drawbacks of CVS/SVN
If the server goes down for an hour, then during that hour
nobody can collaborate at all or save versioned changes to
anything they’re working on. If the hard disk the central
database is on becomes corrupted, and proper backups
haven’t been kept, you lose absolutely everything – the
entire history of the project except whatever
single snapshots people happen to have on their local
machines.
Advantages of Git
This is where Distributed Version Control Systems (DVCSs) step
in. In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients
don’t just check out the latest snapshot of the files: they fully
mirror the repository. Thus if any server dies, and these systems
were collaborating via it, any of the client repositories can be
copied back up to the server to restore it. Every clone is really a
full backup of all the data.
Setting up Git on windows and mac
The most official build is available for download on the Git
website. Just go to http://git-cm.com/download/ where
you can find for setup tools for windows, mac, linux and for
other OS as well.
This will provide git command line tools with Git bash, Git
cmd and Git GUI.
Also you can use through Github windows tools which are
available at https://desktop.github.com/ for both windows
and mac.
Setting up of Git Repository
You can setup git repository in two ways
The first way takes an existing project or directory and imports it into Git. The
second clones an existing Git repository from another server.
Initializing a Repository in an Existing Directory
If you’re starting to track an existing project in Git, you need to go to the
project’s directory and type $ git init.
 This creates a new subdirectory named .git that contains all of your
necessary repository files – a Git repository skeleton. At this point, nothing
in your project is tracked yet.
Now, if you want to start version-controlling existing files (as opposed to an
empty directory), you should probably begin tracking those files and do an
initial commit.
 $ git add *.c
 $ git add LICENSE
 $ git commit -m 'initial project version
Cloning existing repositories
 If you want to get a copy of an existing Git repository – for
example, a project you’d like to contribute to – the command is:
git clone
e.g. $ git clone https://github.com/prabaltyagi/GithubTesting.git
This command will clone the existing remote repository to the user
directory of your system. To clone to a specific folder
Git clone <urlToYourRepo> <Path on your system>
Thank You
Git Training

More Related Content

What's hot

Github
GithubGithub
Using GIT for Everyone
Using GIT for EveryoneUsing GIT for Everyone
Using GIT for Everyone
GLC Networks
 
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
Ashok Kumar Satuluri
 
Git & GitHub
Git & GitHubGit & GitHub
Git & GitHub
Cuong Ngo
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Rick Umali
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
Gandhi Ramu
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
Himanshu Agrawal
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
Jiwon Baek
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
gdgjss
 
Formation git
Formation gitFormation git
Formation git
Ghariani Tewfik
 
Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013
Sunny Sharma
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git Gyan
Git GyanGit Gyan
Git Gyan
Ravishankar S R
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
Yan Vugenfirer
 
Bitbucket and Git
Bitbucket and GitBitbucket and Git
Bitbucket and Git
Mohit Shukla
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control system
Biga Gaber
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Luigi De Russis
 

What's hot (20)

Github
GithubGithub
Github
 
Using GIT for Everyone
Using GIT for EveryoneUsing GIT for Everyone
Using GIT for Everyone
 
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
 
Git & GitHub
Git & GitHubGit & GitHub
Git & GitHub
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
 
Formation git
Formation gitFormation git
Formation git
 
Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git Gyan
Git GyanGit Gyan
Git Gyan
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
 
Bitbucket and Git
Bitbucket and GitBitbucket and Git
Bitbucket and Git
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control system
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 

Viewers also liked

Short term furnished apartments in philadelphia
Short term furnished apartments in philadelphiaShort term furnished apartments in philadelphia
Short term furnished apartments in philadelphia
Maxwell Johnson
 
Mother day
Mother dayMother day
Mother day
mimiming
 
Dampak BTM
Dampak BTMDampak BTM
Dampak BTM
Nurul Irfan
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
Prabal Tyagi
 
Jabones y detergencia
Jabones y detergenciaJabones y detergencia
Jabones y detergencia
Daniel Camacho
 
Language admin
Language  adminLanguage  admin
Language admin
Nenna Adjha
 
Shiny r, live shared and explored
Shiny   r, live shared and exploredShiny   r, live shared and explored
Shiny r, live shared and explored
Alex Brown
 
Plastic roads
Plastic roadsPlastic roads
Plastic roads
Hema Kandpal
 
Polímeros vinílicos
Polímeros vinílicosPolímeros vinílicos
Polímeros vinílicos
Daniel Camacho
 
FINAL PROJECT REPORT
FINAL PROJECT REPORTFINAL PROJECT REPORT
FINAL PROJECT REPORT
Dhrumil Shah
 
Tabla de grupos funcionales orgánicos oxigenados
Tabla de grupos funcionales orgánicos oxigenadosTabla de grupos funcionales orgánicos oxigenados
Tabla de grupos funcionales orgánicos oxigenados
Daniel Camacho
 

Viewers also liked (13)

Short term furnished apartments in philadelphia
Short term furnished apartments in philadelphiaShort term furnished apartments in philadelphia
Short term furnished apartments in philadelphia
 
Mother day
Mother dayMother day
Mother day
 
Portfolio izhboldin
Portfolio izhboldinPortfolio izhboldin
Portfolio izhboldin
 
Dampak BTM
Dampak BTMDampak BTM
Dampak BTM
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
 
Jabones y detergencia
Jabones y detergenciaJabones y detergencia
Jabones y detergencia
 
Language admin
Language  adminLanguage  admin
Language admin
 
Shiny r, live shared and explored
Shiny   r, live shared and exploredShiny   r, live shared and explored
Shiny r, live shared and explored
 
Keamanan pangan
Keamanan panganKeamanan pangan
Keamanan pangan
 
Plastic roads
Plastic roadsPlastic roads
Plastic roads
 
Polímeros vinílicos
Polímeros vinílicosPolímeros vinílicos
Polímeros vinílicos
 
FINAL PROJECT REPORT
FINAL PROJECT REPORTFINAL PROJECT REPORT
FINAL PROJECT REPORT
 
Tabla de grupos funcionales orgánicos oxigenados
Tabla de grupos funcionales orgánicos oxigenadosTabla de grupos funcionales orgánicos oxigenados
Tabla de grupos funcionales orgánicos oxigenados
 

Similar to Git Training

Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
Git 101
Git 101Git 101
Git 101
jayrparro
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Sahil Agarwal
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
AbelPhilipJoseph
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
HuthaifaAlmaqrami1
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
PRIYATHAMDARISI
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Git Series - Part 1
Git Series - Part 1 Git Series - Part 1
Git Series - Part 1
Mohamed Abdeen
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
Nyros Technologies
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocido
Luis Bertel
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
Martin Jinoch
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
PouriaQashqai1
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
SawanBhattacharya
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
Eshaan35
 
You can git
You can gitYou can git
You can git
Yu GUAN
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
Yeasin Abedin
 
Git
GitGit
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
Vikram SV
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
Chen-Tien Tsai
 

Similar to Git Training (20)

Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Git 101
Git 101Git 101
Git 101
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Git Series - Part 1
Git Series - Part 1 Git Series - Part 1
Git Series - Part 1
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocido
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
You can git
You can gitYou can git
You can git
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
 
Git
GitGit
Git
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 

Git Training

  • 1. Presented By Organized By Prabal Tyagi Rajeev Singh
  • 2. Topics • What is Git? How it is different from Github • Difference between Git and other versioning systems • Setting up Git on windows, mac and linux OS • Setting up of Github Repository • Git Commands • GUI based tools for Git(SourceTree, Git GUI etc)
  • 3. What is Git? How it is different from Github Git is a free and open source distributed version control system , a tool to manage your source code history. Github is a hosting service for Git repositories, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features like wikis, task management, and bug tracking and feature requests for every project. In brief, Git is the tool, and Github is the service for projects that use Git. You do not need GitHub to use Git. Git = Local (on your computer), GitHub = Remote (web). Github allows you to: Share your repositories with others. Access other user's repositories. Store remote copies of your repositories (github servers) as backup of your local copies.
  • 4. Difference between Git and other versioning systems  What is CVS/SVN?  Systems such as CVS, Subversion, and Perforce, have a single server that contains all the versions files, and a number of clients that check out files from that central place. For many years, this has been the standard for version control.
  • 5. Drawbacks of CVS/SVN If the server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on. If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everything – the entire history of the project except whatever single snapshots people happen to have on their local machines.
  • 6. Advantages of Git This is where Distributed Version Control Systems (DVCSs) step in. In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data.
  • 7. Setting up Git on windows and mac The most official build is available for download on the Git website. Just go to http://git-cm.com/download/ where you can find for setup tools for windows, mac, linux and for other OS as well. This will provide git command line tools with Git bash, Git cmd and Git GUI. Also you can use through Github windows tools which are available at https://desktop.github.com/ for both windows and mac.
  • 8. Setting up of Git Repository You can setup git repository in two ways The first way takes an existing project or directory and imports it into Git. The second clones an existing Git repository from another server. Initializing a Repository in an Existing Directory If you’re starting to track an existing project in Git, you need to go to the project’s directory and type $ git init.  This creates a new subdirectory named .git that contains all of your necessary repository files – a Git repository skeleton. At this point, nothing in your project is tracked yet. Now, if you want to start version-controlling existing files (as opposed to an empty directory), you should probably begin tracking those files and do an initial commit.  $ git add *.c  $ git add LICENSE  $ git commit -m 'initial project version
  • 9. Cloning existing repositories  If you want to get a copy of an existing Git repository – for example, a project you’d like to contribute to – the command is: git clone e.g. $ git clone https://github.com/prabaltyagi/GithubTesting.git This command will clone the existing remote repository to the user directory of your system. To clone to a specific folder Git clone <urlToYourRepo> <Path on your system>