SlideShare a Scribd company logo
Working with Git distributed
                   revision control system



Jordi Mas – jmas@softcatala.org, @jordimash
Barcelona Developers Conference 2011
Index

- Introduction to Git
- Key concepts
- Branching
- The software
- Further reading
- On-hands work
What, Where, When, Why & Who
 ●    Git is an open source DVCS (Distributed Version Control System)
 ●    Comes from the needs of the kernel.org community
 ●    Started in 2005 by Linus Torvalds, continued by Junio Hamano and +
 ●    “...Distributed version control is … possibly the biggest advance in
      software development technology in the [past] ten years." Joel
      Spolsky *
 ●    Other popular open source DVCS
           Bazaar, Mercurial

* http://joelonsoftware.com/items/2010/03/17.html
Git - Features
●   Distributed development        ●   Supports HTTP, FTP, rsync, or a
                                       Git protocol (over ssh too).
●   Fast as a shark
                                   ●   Can act as a SVN/CVS server,
●   Great support for branches         transparent to legacy users
●   Secure and consistent          ●   Pre / post hooks
●   Toolkit design (Aka API)
●   Multi-platform (Linux, Mac &
    Windows)
Community
         Hundreds
●   Dozens of large open source projects (GNOME, Mono, KDE,
    Kernel.org, Android, github hosting, etc) and corporate users using it
    every day
●   Good books from Apress, O'Reilly and on-line
●   Community documentation
●   Forums, mailing lists, weblogs, irc
Index

- Introduction to Git
- Key concepts
- Branching
- The software
- Further reading
- On-hands work
DVCS
●   Server based (SVN, etc)

         You have the lastest version of the repo
         Depends always on a sever (commit, blame, etc)
         Revisions numbers are tied to a repository
     


●   Git

         Every client has a full copy of the repository
         Can work off-line
         Revisions numbers are SHA-1 based on content
Staging area or index
●   An intermediate local area that you can setup how your commit will
    look like before you commit it. Like a temporary local branch.
        Allows precise control of what your commit is going to look like
        Usefull for single commits with many changes & files
●   You can skip it by using git commit -a and work directly on the
    repository
Index

- Introduction to Git
- Key concepts
- Branching
- The software
- Further reading
- On-hands work
Branches – diverging branch
●   A branch uses 40 bytes since it is just a pointer (compare this to
    the copy approach of SVN)
●   A experiment branch with a single commit and master with a
    different commit
Branches – 3 way merging
Three-way merge between the two latest branch snapshots (C3 and
C4) and the most recent common ancestor of the two (C2), creating a
new snapshot (and commit)
Branches – rebasing
Uses the common ancestor of the two branches getting the diff
introduced by each commit of the branch you’re on, saving those diffs
to temporary files, resetting the current branch to the same commit as
the branch you are rebasing onto, and finally applying each change in
turn.
Index

- Introduction to Git
- Key concepts
- Branching
- The software
- Further reading
- On-hands work
Git official packages
●   Download them from http://git-scm.com/download
Tortoise Git for Windows
Software – cgit web based UI




 Sample: http://git.gnome.org/browse/gbrainy/
Index

- Introduction to Git
- Key concepts
- Branching
- The software
- Further reading
- On-hands work
A strongly recommended book




       http://www.progit.org/
Index

- Introduction to Git
- Key concepts
- Branching
- The software
- Further reading
- On-hands work

More Related Content

PDF
Orchestrating Linux Containers
PDF
OpenZFS Developer Summit Introduction
PPTX
Git vs svn
PDF
Performant and Resilient Storage: The Open Source & Linux Way
PDF
Docker Introduction - DevOps Montreal Meetup
PDF
oVirt – open your virtual datacenter
PDF
Scaling Docker Registry
PPTX
Advantages and disadvantages of a monorepo
Orchestrating Linux Containers
OpenZFS Developer Summit Introduction
Git vs svn
Performant and Resilient Storage: The Open Source & Linux Way
Docker Introduction - DevOps Montreal Meetup
oVirt – open your virtual datacenter
Scaling Docker Registry
Advantages and disadvantages of a monorepo

What's hot (19)

PDF
Docker. General overview
PDF
OpenZFS - BSDcan 2014
PPTX
Introduction to git
PDF
Docker off the grid
PDF
Libcontainer: joining forces under one roof
PDF
NATS in action - A Real time Microservices Architecture handled by NATS
PPTX
Master the Monorepo
PDF
Getting Started with Containers
PDF
Nats.io meetup october 2015 - Community Update
PPTX
Jp medierworkflow
ODP
20160401 Gluster-roadmap
PDF
Docker for Drupal development
ODP
Certificate based access type in openstack Manila @ openstack paris nov. 2014
PPTX
First steps with kubernetes
PDF
BKK16-411 Devicetree Specification
PDF
Marriage with docker
PDF
Embedded Operating System - Linux
PPTX
Testing Rest with Spring by Kostiantyn Baranov (Senior Software Engineer, Gl...
PDF
DockerCon 2016 Recap
Docker. General overview
OpenZFS - BSDcan 2014
Introduction to git
Docker off the grid
Libcontainer: joining forces under one roof
NATS in action - A Real time Microservices Architecture handled by NATS
Master the Monorepo
Getting Started with Containers
Nats.io meetup october 2015 - Community Update
Jp medierworkflow
20160401 Gluster-roadmap
Docker for Drupal development
Certificate based access type in openstack Manila @ openstack paris nov. 2014
First steps with kubernetes
BKK16-411 Devicetree Specification
Marriage with docker
Embedded Operating System - Linux
Testing Rest with Spring by Kostiantyn Baranov (Senior Software Engineer, Gl...
DockerCon 2016 Recap
Ad

Viewers also liked (11)

PPTX
git presentation
PDF
Web Training Aula 04: Introduction to Git
PPTX
GIT presentation
PDF
Pragmatic Guide to Git
PDF
Intro To Regex In Java
PDF
Git basics
PPTX
Git - Basic Crash Course
PDF
Git Presentation - Handout
KEY
Git Beginner Preso
PPTX
Beginner's guide to git
PDF
Git pour les (pas si) nuls
git presentation
Web Training Aula 04: Introduction to Git
GIT presentation
Pragmatic Guide to Git
Intro To Regex In Java
Git basics
Git - Basic Crash Course
Git Presentation - Handout
Git Beginner Preso
Beginner's guide to git
Git pour les (pas si) nuls
Ad

Similar to Git presentation (20)

PDF
The Source Control Landscape
PPTX
Mini-training: Let’s Git It!
PDF
Git SVN Migrate Reasons
ODP
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
PDF
Git Tutorial
PDF
Versioning for Developers
PPTX
Version Control, Writers, and Workflows
PPTX
Contributing To CentOS SIGs
PDF
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
PPTX
the Version Control systemlocalized.pptx
PPSX
Hackaton for health 2015 - Sharing the Code we Make
PPTX
Continous delivvery devops Tools Technologies.pptx
PPT
Mantis Code Deployment Process
PDF
Software Engineering Tools and Practices Learn Git
PPTX
Collaborative software development with versioning
PDF
Session: Git Basics & GitFlow Workflow
PDF
Running A SIG in CentOS @Devconf Brno 2014
PDF
Linux-Internals-and-Networking
PDF
The Fn Project: A Quick Introduction (December 2017)
The Source Control Landscape
Mini-training: Let’s Git It!
Git SVN Migrate Reasons
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Git Tutorial
Versioning for Developers
Version Control, Writers, and Workflows
Contributing To CentOS SIGs
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
the Version Control systemlocalized.pptx
Hackaton for health 2015 - Sharing the Code we Make
Continous delivvery devops Tools Technologies.pptx
Mantis Code Deployment Process
Software Engineering Tools and Practices Learn Git
Collaborative software development with versioning
Session: Git Basics & GitFlow Workflow
Running A SIG in CentOS @Devconf Brno 2014
Linux-Internals-and-Networking
The Fn Project: A Quick Introduction (December 2017)

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation theory and applications.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Electronic commerce courselecture one. Pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation theory and applications.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Electronic commerce courselecture one. Pdf
Programs and apps: productivity, graphics, security and other tools

Git presentation

  • 1. Working with Git distributed revision control system Jordi Mas – jmas@softcatala.org, @jordimash Barcelona Developers Conference 2011
  • 2. Index - Introduction to Git - Key concepts - Branching - The software - Further reading - On-hands work
  • 3. What, Where, When, Why & Who ● Git is an open source DVCS (Distributed Version Control System) ● Comes from the needs of the kernel.org community ● Started in 2005 by Linus Torvalds, continued by Junio Hamano and + ● “...Distributed version control is … possibly the biggest advance in software development technology in the [past] ten years." Joel Spolsky * ● Other popular open source DVCS  Bazaar, Mercurial * http://joelonsoftware.com/items/2010/03/17.html
  • 4. Git - Features ● Distributed development ● Supports HTTP, FTP, rsync, or a Git protocol (over ssh too). ● Fast as a shark ● Can act as a SVN/CVS server, ● Great support for branches transparent to legacy users ● Secure and consistent ● Pre / post hooks ● Toolkit design (Aka API) ● Multi-platform (Linux, Mac & Windows)
  • 5. Community Hundreds ● Dozens of large open source projects (GNOME, Mono, KDE, Kernel.org, Android, github hosting, etc) and corporate users using it every day ● Good books from Apress, O'Reilly and on-line ● Community documentation ● Forums, mailing lists, weblogs, irc
  • 6. Index - Introduction to Git - Key concepts - Branching - The software - Further reading - On-hands work
  • 7. DVCS ● Server based (SVN, etc)  You have the lastest version of the repo  Depends always on a sever (commit, blame, etc)  Revisions numbers are tied to a repository  ● Git  Every client has a full copy of the repository  Can work off-line  Revisions numbers are SHA-1 based on content
  • 8. Staging area or index ● An intermediate local area that you can setup how your commit will look like before you commit it. Like a temporary local branch.  Allows precise control of what your commit is going to look like  Usefull for single commits with many changes & files ● You can skip it by using git commit -a and work directly on the repository
  • 9. Index - Introduction to Git - Key concepts - Branching - The software - Further reading - On-hands work
  • 10. Branches – diverging branch ● A branch uses 40 bytes since it is just a pointer (compare this to the copy approach of SVN) ● A experiment branch with a single commit and master with a different commit
  • 11. Branches – 3 way merging Three-way merge between the two latest branch snapshots (C3 and C4) and the most recent common ancestor of the two (C2), creating a new snapshot (and commit)
  • 12. Branches – rebasing Uses the common ancestor of the two branches getting the diff introduced by each commit of the branch you’re on, saving those diffs to temporary files, resetting the current branch to the same commit as the branch you are rebasing onto, and finally applying each change in turn.
  • 13. Index - Introduction to Git - Key concepts - Branching - The software - Further reading - On-hands work
  • 14. Git official packages ● Download them from http://git-scm.com/download
  • 15. Tortoise Git for Windows
  • 16. Software – cgit web based UI Sample: http://git.gnome.org/browse/gbrainy/
  • 17. Index - Introduction to Git - Key concepts - Branching - The software - Further reading - On-hands work
  • 18. A strongly recommended book http://www.progit.org/
  • 19. Index - Introduction to Git - Key concepts - Branching - The software - Further reading - On-hands work