SlideShare a Scribd company logo
Git: Be Social 
Geronimo Orozco 
gorozco @ gmail.com 
Sept 2011
● General introduction: 
– Who I am 
– Brief intro to VCS 
● What is VCS 
Scope 
● Why do we need it 
● Types of VCS 
– Git 
● History 
● What is Git 
● General features 
● Traditional Way 
● The Git way 
● The Three states 
● The basic workflow 
● Tutorial 
● Talk highly based on Pro Git (Seriously 
this is just a extract and you should read the 
book)
Who am I ? 
(or why you should listen to me) 
● Open Source Advocate User & Developer 
– 4 years in QA 
– 6 years as SysAdmin 
– 6 years as Software Developer 
– YaCOMAS (2004 released as GPL)
Who am I ? 
(or why you should listen to me) 
● Open Source Advocate User & Developer 
– 4 years in QA 
– 6 years as SysAdmin 
– 6 years as Software Developer 
– YaCOMAS (2004 released as GPL) 
● I messed up too many times.
Version Control Systems 
● Simple: 
– VCS lets you track your files over time. 
● 
● 
● 
● 
2012/10/01 
Poem: 
2012/10/02 
Poem: 
Roses are red, 
violets are blue
Version Control Systems 
● Simple: 
– VCS lets you track your files over time. 
● 
● 
● 
2012/10/01 
Poem: 
2012/10/02 
● Why do you care? 
Poem: 
Roses are red, 
violets are blue
Version Control Systems 
● Simple: 
– VCS lets you track your files over time. 
● 
● 
● 
2012/10/01 
Poem: 
2012/10/02 
Roses are red, 
violets are blue 
● Why do you care? 
2012/10/03 
– So when you mess up you can easily get back 
to a previous working version. 
Roses are red, 
violets are blue 
i tought i was ugly 
but then i met you
Version Control Systems 
● Why do we need it: 
– Backup and Restore 
– Synchronization. 
– Short-term undo 
– Long-term undo 
– Track Changes 
– Track Ownership 
– Sandboxing 
– Branching and merging
Local Version Control Systems
Centralized Version Control Systems
Distributed Version Control Systems
History of Git 
● Originally Developed by Linus Torvalds 
● Currently Maintained by Junio Hamano 
● Born to Manage Linux Kernel Development 
● Open Source, free (GNU GPL V2)
History of Git 
● Originally Developed by Linus Torvalds 
● Currently Maintained by Junio Hamano 
● Born to Manage Linux Kernel Development 
● Open Source, free (GNU GPL V2) 
English slang for a stupid or unpleasant 
person. 
Torvalds said: "I'm an egotistical bastard, 
and I name all my projects after myself. 
First 'Linux', now 'git'."
What is Git? 
● Distributed Source Control Management tool 
● Born to Manage Linux Kernel Development 
● Open Source, free (GNU GPL V2)
General features 
● Speed 
● Simple design 
● Strong support for non-linear development 
(thousands of parallel branches) 
● Fully distributed 
● Able to handle large projects like the Linux 
kernel efficiently (speed and data size)
a list of file-based changes 
(traditional way)
A mini file system (The Git way)
The Git way 
● Nearly Every Operation Is Local 
– Most operations in Git only need local files and 
resources to operate 
● Git Has Integrity 
– Everything in Git is check-summed before it is 
stored and is then referred to by that 
checksum. 
● Git Generally Only Adds Data
The Three States
The basic workflow 
● You modify files in your working directory. 
● You stage the files, adding snapshots of them 
to your staging area. 
● You do a commit, which takes the files as they 
are in the staging area and stores that 
snapshot permanently to your Git directory.
Tutorial
Installing git 
● Ubuntu 
– $ apt-get install git-core 
● Fedora 
– $ yum install git-core 
● Windows 
– http://code.google.com/p/msysgit
Git setup 
● General 
– $ git config --global user.name "John Doe" 
– $ git config --global user.email johndoe@example.com 
● Your Editor 
– $ git config --global core.editor vim 
● Your Diff Tool: 
– $ git config --global merge.tool vimdiff 
● Check your settings: 
– $ git config --list
Getting help 
● $ git help <verb> 
● $ git <verb> --help 
● $ man git-<verb> 
● Ex: 
– $ git help config
Git Basics - Recording Changes to the 
Repository
Git Basics - Getting a Git Repository 
Initializing a Repository in an Existing Directory 
$ git init 
– This creates a new subdirectory named .git 
(The git directory)
Git Basics - Getting a Git Repository 
Cloning an Existing Repository 
$ git clone https://github.com/patux/YaCOMAS 
$ git clone repo1 repo2
Git Basics - Recording Changes to the 
Repository 
(Checking the Status of Your Files) 
$ git status
Git Basics - Getting a Git Repository 
Tracking New Files 
$ git add README
Git Basics - Recording Changes to the 
Repository 
Viewing Your Staged and Unstaged Changes 
$ git diff
Git Basics - Recording Changes to the 
Repository 
Committing Your Changes 
$ git add 
$ git commit
Git Basics - Recording Changes to the 
Repository 
Removing files 
$ rm file 
$ git status
Git Basics - Recording Changes to the 
Repository 
Moving files 
$ git mv file_from file_to 
$ git status
Git Basics – History 
Viewing the Commit History 
$ git log 
●GUI: 
● gitk 
● gitg
Git Basics – Undoing things 
Changing your last commit 
$ git commit -m 'initial commit' 
$ git add forgotten_file 
$ git commit --amend
Git Basics – Working with remotes 
Showing your remotes 
$ git clone https://github.com/patux/YaCOMAS 
$ git remote 
$ git remote -v
Git Basics – Working with remotes 
Adding Remote Repositories 
$ git remote add pb git://github.com/foo/YaCOMAS 
$ git remote -v
Git Basics – Working with remotes 
Fetching and Pulling from Your Remotes 
$ git fetch [remote-name] 
$ git pull [remote-name]
Git Basics – Working with remotes 
Removing and Renaming Remotes 
$ git remote rename pb paul 
$ git remote rm paul
Git Basics – Working with remotes 
Pushing to Your Remotes 
$ git push [remote-name]
Git Basics – Working with remotes 
Pushing to Your Remotes
Git Basics – Tagging 
Listing yout Tags 
$ git tag 
$ git tag -l 'v1.4.2.*' 
$ git tag -a v1.4 -m 'my version 1.4' 
$ git show v1.4 
$ git push origin v1.5 
$ git push origin --tags
Git Basics – Branches 
What a Branch Is
Git Basics – Branches 
What a Branch Is 
$ git branch testing
Git Basics – Branches 
What a Branch Is 
$ git checkout testing
Git Basics – Branches 
What a Branch Is 
$ vim test.rb 
$ git commit -a -m 'made a change'
Git Basics – Branches 
What a Branch Is 
$ git checkout master
Git Basics – Branches 
What a Branch Is 
$ vim test.rb 
$ git commit -a -m 'made other changes'
References 
● http://git-scm.com/book/ 
● http://www.slideshare.net/anildigital/git-introduction 
● http://nvie.com/posts/a-successful-git-branching-model/
Questions ? 
geronimo.orozco@intel.com 
Twitter: @patux 
Github: https://github.com/patux

More Related Content

ODP
Development nightmares
ODP
Vagrant and puppet: Deployment made easy
PDF
Stop Sucking at Building Stuff!
PDF
Local Community for Debian (2013 Taiwan miniDebConf)
ODP
Git In One Evening
PDF
8-9-10=Jessie,Stretch,Buster
PDF
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
PPTX
Development nightmares
Vagrant and puppet: Deployment made easy
Stop Sucking at Building Stuff!
Local Community for Debian (2013 Taiwan miniDebConf)
Git In One Evening
8-9-10=Jessie,Stretch,Buster
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images

What's hot (20)

PDF
find & improve some bottleneck in Debian project (DebConf14 LT)
PDF
Better delivery with DevOps Driven Development
PDF
Puppet at GitHub
PDF
Let the contribution begin (EST futures)
ODP
Package Drone @ Eclipse Demo Camp Munich 2015
PDF
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
PDF
Introduction to Google Web Toolkit - part 1
PDF
Lets isolate a process with no container like docker
PDF
Python Projects at Neova
ODP
about Debian "squeeze" @201002 OSC Tokyospring
PDF
Biscuit: an operating system written in go
PDF
Does Cowgirl Dream of Red Swirl?
ODP
Ripping web accessible .git files
PDF
Intro to Git for Drupal 7
ODP
Buildout: creating and deploying repeatable applications in python
PDF
Creare Docker da zero con GoLang - Giulio De Donato
ODP
Wonderful world of (distributed) SCM or VCS
PDF
Git training with Devaamo
PDF
OpenStack Swift on virtualbox
PDF
Porting your favourite cmdline tool to Android
find & improve some bottleneck in Debian project (DebConf14 LT)
Better delivery with DevOps Driven Development
Puppet at GitHub
Let the contribution begin (EST futures)
Package Drone @ Eclipse Demo Camp Munich 2015
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
Introduction to Google Web Toolkit - part 1
Lets isolate a process with no container like docker
Python Projects at Neova
about Debian "squeeze" @201002 OSC Tokyospring
Biscuit: an operating system written in go
Does Cowgirl Dream of Red Swirl?
Ripping web accessible .git files
Intro to Git for Drupal 7
Buildout: creating and deploying repeatable applications in python
Creare Docker da zero con GoLang - Giulio De Donato
Wonderful world of (distributed) SCM or VCS
Git training with Devaamo
OpenStack Swift on virtualbox
Porting your favourite cmdline tool to Android
Ad

Viewers also liked (17)

DOCX
Corrección evaluación operativa 2
PDF
PDF
Museu Antonino de Faro e o turismo no Algarve
PPT
Webs we, teenagers, visit (3)
PPT
Groovy
PPTX
SecZone 2011: Scrubbing SAP clean with SOAP
PDF
marathon legs recovery
PPTX
The search engine experience 2.0 - U of U MBA @DESB_UofU
PDF
Campus La Camilla - Il progetto
PDF
Blue marlin
PDF
Fabrication des trophées Ticket for Change 2014 par tri-D
PDF
120 WATSUK 2014 Antony Askew - AutoSys In The Real World
DOCX
Ruben info 1
PPT
Home golf simulator
PPTX
The story of MEB Management Services
PDF
Goldline catalouge
PPTX
FILTRATION WATER SERVICES POOL REDUCTION TO PRIVATE LEISURE CENTRE ENERGY SAV...
Corrección evaluación operativa 2
Museu Antonino de Faro e o turismo no Algarve
Webs we, teenagers, visit (3)
Groovy
SecZone 2011: Scrubbing SAP clean with SOAP
marathon legs recovery
The search engine experience 2.0 - U of U MBA @DESB_UofU
Campus La Camilla - Il progetto
Blue marlin
Fabrication des trophées Ticket for Change 2014 par tri-D
120 WATSUK 2014 Antony Askew - AutoSys In The Real World
Ruben info 1
Home golf simulator
The story of MEB Management Services
Goldline catalouge
FILTRATION WATER SERVICES POOL REDUCTION TO PRIVATE LEISURE CENTRE ENERGY SAV...
Ad

Similar to Git: be social (20)

PDF
Git 入门与实践
PDF
PDF
Git 入门 与 实践
PPTX
Introduction to Git and Github
PDF
Version Control with Git
PDF
Harvard ABCD-WWW Git presentation
PDF
Version Control System - Git
PPTX
Version controll.pptx
PPT
Git training
PPTX
Version Control with Git
PPTX
Getting Started with Git: A Primer for SVN and TFS Users
PPTX
Git 101
PDF
Rc094 010d-git 2 - desconocido
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPTX
Git 101
PDF
Git hub
PPT
git2.ppt
PPTX
GIT INTRODUCTION
PDF
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
PDF
Why Git Sucks and you'll use it anyways
Git 入门与实践
Git 入门 与 实践
Introduction to Git and Github
Version Control with Git
Harvard ABCD-WWW Git presentation
Version Control System - Git
Version controll.pptx
Git training
Version Control with Git
Getting Started with Git: A Primer for SVN and TFS Users
Git 101
Rc094 010d-git 2 - desconocido
Let's Git this Party Started: An Introduction to Git and GitHub
Git 101
Git hub
git2.ppt
GIT INTRODUCTION
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Why Git Sucks and you'll use it anyways

Recently uploaded (20)

PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
assetexplorer- product-overview - presentation
PDF
medical staffing services at VALiNTRY
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Introduction to Artificial Intelligence
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
System and Network Administration Chapter 2
PDF
Cost to Outsource Software Development in 2025
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Transform Your Business with a Software ERP System
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms II-SECS-1021-03
L1 - Introduction to python Backend.pptx
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
assetexplorer- product-overview - presentation
medical staffing services at VALiNTRY
Wondershare Filmora 15 Crack With Activation Key [2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Introduction to Artificial Intelligence
Which alternative to Crystal Reports is best for small or large businesses.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Reimagine Home Health with the Power of Agentic AI​
Odoo POS Development Services by CandidRoot Solutions
System and Network Administration Chapter 2
Cost to Outsource Software Development in 2025
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
CHAPTER 2 - PM Management and IT Context
Transform Your Business with a Software ERP System

Git: be social

  • 1. Git: Be Social Geronimo Orozco gorozco @ gmail.com Sept 2011
  • 2. ● General introduction: – Who I am – Brief intro to VCS ● What is VCS Scope ● Why do we need it ● Types of VCS – Git ● History ● What is Git ● General features ● Traditional Way ● The Git way ● The Three states ● The basic workflow ● Tutorial ● Talk highly based on Pro Git (Seriously this is just a extract and you should read the book)
  • 3. Who am I ? (or why you should listen to me) ● Open Source Advocate User & Developer – 4 years in QA – 6 years as SysAdmin – 6 years as Software Developer – YaCOMAS (2004 released as GPL)
  • 4. Who am I ? (or why you should listen to me) ● Open Source Advocate User & Developer – 4 years in QA – 6 years as SysAdmin – 6 years as Software Developer – YaCOMAS (2004 released as GPL) ● I messed up too many times.
  • 5. Version Control Systems ● Simple: – VCS lets you track your files over time. ● ● ● ● 2012/10/01 Poem: 2012/10/02 Poem: Roses are red, violets are blue
  • 6. Version Control Systems ● Simple: – VCS lets you track your files over time. ● ● ● 2012/10/01 Poem: 2012/10/02 ● Why do you care? Poem: Roses are red, violets are blue
  • 7. Version Control Systems ● Simple: – VCS lets you track your files over time. ● ● ● 2012/10/01 Poem: 2012/10/02 Roses are red, violets are blue ● Why do you care? 2012/10/03 – So when you mess up you can easily get back to a previous working version. Roses are red, violets are blue i tought i was ugly but then i met you
  • 8. Version Control Systems ● Why do we need it: – Backup and Restore – Synchronization. – Short-term undo – Long-term undo – Track Changes – Track Ownership – Sandboxing – Branching and merging
  • 12. History of Git ● Originally Developed by Linus Torvalds ● Currently Maintained by Junio Hamano ● Born to Manage Linux Kernel Development ● Open Source, free (GNU GPL V2)
  • 13. History of Git ● Originally Developed by Linus Torvalds ● Currently Maintained by Junio Hamano ● Born to Manage Linux Kernel Development ● Open Source, free (GNU GPL V2) English slang for a stupid or unpleasant person. Torvalds said: "I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'."
  • 14. What is Git? ● Distributed Source Control Management tool ● Born to Manage Linux Kernel Development ● Open Source, free (GNU GPL V2)
  • 15. General features ● Speed ● Simple design ● Strong support for non-linear development (thousands of parallel branches) ● Fully distributed ● Able to handle large projects like the Linux kernel efficiently (speed and data size)
  • 16. a list of file-based changes (traditional way)
  • 17. A mini file system (The Git way)
  • 18. The Git way ● Nearly Every Operation Is Local – Most operations in Git only need local files and resources to operate ● Git Has Integrity – Everything in Git is check-summed before it is stored and is then referred to by that checksum. ● Git Generally Only Adds Data
  • 20. The basic workflow ● You modify files in your working directory. ● You stage the files, adding snapshots of them to your staging area. ● You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.
  • 22. Installing git ● Ubuntu – $ apt-get install git-core ● Fedora – $ yum install git-core ● Windows – http://code.google.com/p/msysgit
  • 23. Git setup ● General – $ git config --global user.name "John Doe" – $ git config --global user.email johndoe@example.com ● Your Editor – $ git config --global core.editor vim ● Your Diff Tool: – $ git config --global merge.tool vimdiff ● Check your settings: – $ git config --list
  • 24. Getting help ● $ git help <verb> ● $ git <verb> --help ● $ man git-<verb> ● Ex: – $ git help config
  • 25. Git Basics - Recording Changes to the Repository
  • 26. Git Basics - Getting a Git Repository Initializing a Repository in an Existing Directory $ git init – This creates a new subdirectory named .git (The git directory)
  • 27. Git Basics - Getting a Git Repository Cloning an Existing Repository $ git clone https://github.com/patux/YaCOMAS $ git clone repo1 repo2
  • 28. Git Basics - Recording Changes to the Repository (Checking the Status of Your Files) $ git status
  • 29. Git Basics - Getting a Git Repository Tracking New Files $ git add README
  • 30. Git Basics - Recording Changes to the Repository Viewing Your Staged and Unstaged Changes $ git diff
  • 31. Git Basics - Recording Changes to the Repository Committing Your Changes $ git add $ git commit
  • 32. Git Basics - Recording Changes to the Repository Removing files $ rm file $ git status
  • 33. Git Basics - Recording Changes to the Repository Moving files $ git mv file_from file_to $ git status
  • 34. Git Basics – History Viewing the Commit History $ git log ●GUI: ● gitk ● gitg
  • 35. Git Basics – Undoing things Changing your last commit $ git commit -m 'initial commit' $ git add forgotten_file $ git commit --amend
  • 36. Git Basics – Working with remotes Showing your remotes $ git clone https://github.com/patux/YaCOMAS $ git remote $ git remote -v
  • 37. Git Basics – Working with remotes Adding Remote Repositories $ git remote add pb git://github.com/foo/YaCOMAS $ git remote -v
  • 38. Git Basics – Working with remotes Fetching and Pulling from Your Remotes $ git fetch [remote-name] $ git pull [remote-name]
  • 39. Git Basics – Working with remotes Removing and Renaming Remotes $ git remote rename pb paul $ git remote rm paul
  • 40. Git Basics – Working with remotes Pushing to Your Remotes $ git push [remote-name]
  • 41. Git Basics – Working with remotes Pushing to Your Remotes
  • 42. Git Basics – Tagging Listing yout Tags $ git tag $ git tag -l 'v1.4.2.*' $ git tag -a v1.4 -m 'my version 1.4' $ git show v1.4 $ git push origin v1.5 $ git push origin --tags
  • 43. Git Basics – Branches What a Branch Is
  • 44. Git Basics – Branches What a Branch Is $ git branch testing
  • 45. Git Basics – Branches What a Branch Is $ git checkout testing
  • 46. Git Basics – Branches What a Branch Is $ vim test.rb $ git commit -a -m 'made a change'
  • 47. Git Basics – Branches What a Branch Is $ git checkout master
  • 48. Git Basics – Branches What a Branch Is $ vim test.rb $ git commit -a -m 'made other changes'
  • 49. References ● http://git-scm.com/book/ ● http://www.slideshare.net/anildigital/git-introduction ● http://nvie.com/posts/a-successful-git-branching-model/
  • 50. Questions ? geronimo.orozco@intel.com Twitter: @patux Github: https://github.com/patux