SlideShare a Scribd company logo
1 of 47
Download to read offline
Git Sucks
How git sucks and why you'll use it anyway
Intro
●   David Whittington
●   Self Employed
    –   xForty
    –   ParentProxy
Goals
●   Convince you to at least try git
●   Give you enough information to get
    started
Experience?
●   What VCS experience do you have?
    –   RCS?
    –   CVS/SVN?
    –   Perforce?
    –   Git/hg/bazaar?
Version Control History
●   In the beginning ... RCS
    –   Lock – modify – unlock
    –   Single file
    –   Makes collaboration difficult
Version Control History
●   CVS/SVN
    –   Copy – modify – merge
    –   Central server
    –   Makes forking + experimentation difficult
Version Control History
●   Distributed version control
    –   Clone – modify – commit – fetch – merge ...
    –   Lots of workflow options
    –   Examples: Git, Mercurial, Bazaar-ng,
        Monotone
What is Git?
●   Distributed VCS system
●   Created in 2005 by Torvalds following
    Bitkeeper fallout
●   DAG based (as opposed to diff based)
Git Sucks
●   DVCS = complexity
●   Unintuitive
●   Documentation also distributed
●   Code can be obtuse
Why You'll Use it Anyway
●   Distributed VCS is Good
    –   Encourages contributions
    –   Encourages experimentation (branches are
        easy)
    –   Offline access rocks
Why You'll Use it Anyway




   from http://blog.orebokech.com/2008/06/updated-debian-vcs-statistics.html
Why You'll Use it Anyway
●   These projects are using it:
    –   Linux Kernel
    –   X.org
    –   Samba
    –   Wine
    –   Ruby on Rails
    –   ... more at http://git.or.cz/gitwiki/GitProjects
Why You'll Use it Anyway
●   It really is powerful
    –   Unixy
    –   Fast
    –   SVN bridge
Why You'll Use it Anyway



      Github rocks!
Why You'll Use it Anyway




    Hypnotoad Commands It!
Using Git - Configuration
$ git config --global user.name “David ...”
$ git config --global user.email “djwhitt@...”
$ git config --list
user.name=”David Whittington”
user.email=”djwhitt@gmail.com”
$ cat ~/.gitconfig
[user]
  name = David Whittington
  email = “djwhitt@gmail.com”
Using Git – Cloning a Repo
$ git clone git://github.com/rails/rails.git
$ cd rails
Using Git – Creating a Repo
$ mkdir deathray
$ cd deathray
$ git init
Using Git – Adding a File
$ echo “deathray - a ray that kills” > README
$ git add README
$ git commit -m “initial commit”
Using Git – Modifying a File
$ echo “most awesome deathray ever” >> README
$ git add README
$ git commit -m “added detail to README”


or ...


$ echo “most awesome deathray ever” >> README
$ git commit -a -m “added detail to README”
Using Git – The Index
Object Dir   Index   Working Dir




 Commits

  Trees      Blobs      Files

  Blobs
Using Git – Branches
$ git branch
* master
$ git branch fusion
$ git branch
 fusion
* master
$ git checkout fusion
$ git branch
* fusion
 master
Using Git – Branches
Using Git – Branches
$ echo “reactor core” > reactor
$ git add reactor
$ git commit -m “adding reactor”
$ ls
README reactor
$ git checkout master
$ ls
README
Using Git – Branches
Using Git - Merging
$ git branch
 fusion
* master
$ echo “focussing lens” > lens
$ git add lens
$ git commit -m “adding lens”
Using Git - Merging
Using Git - Merging
$ git merge fusion
Using Git - Merging
Using Git - Rebasing
$ git branch
 fusion
* master
$ echo “focussing lens” > lens
$ git add lens
$ git commit -m “adding lens”
Using Git - Rebasing
Using Git - Rebasing
$ git rebase fusion
Using Git - Rebasing
Using Git – Git Status
$ git status
# Changed but not updated:
#       modified:    lens
# Untracked files:
#       amplifier
Using Git – Git Log
$ git log
commit c23d31c9d34c7bf540a8e57f615f735f9ecdc2f2
Author: David Whittington <djwhitt@gmail.com>
Date:    Tue Oct 14 14:25:55 2008 -0400


      adding lens
...
Using Git - .gitignore
$ cat .gitignore
# swap files
*.swp
# temp dir
/tmp
Using Git - Aliases
$ git config --global alias.co checkout
$ git co fusion
Using Git – Awesome Stuff
$ git add --interactive
$ git add --patch
$ git stash
Using Git - Github
Using Git - Github
Using Git - Github
Using Git – Remote + Push
$ git remote add github 
> git@github.com:djwhitt/deathray.git
$ git push github master
Using Git – Fetch, Merge, Pull
$ git fetch github
$ git merge github/master


or...


$ git pull github master
Using Git - Tracking
$ git config branch.master.remote github

$ git config branch.master.merge github/master
Stuff I Didn't Cover
●   Workflow
●   Conflicts
●   Many more git commands
●   Internals
●   Other hosting options
Resources
●   http://git.or.cz/index.html
●   http://git-scm.com/
●   http://www.gitcasts.com/
●   http://peepcode.com/
    –   screencast and pdf book
    –   not free
Questions?

More Related Content

What's hot

08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24
08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 2408 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24
08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24
legasu zemene
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RS
Frank Kim
 
Mobile application testing report
Mobile application testing reportMobile application testing report
Mobile application testing report
QA Madness
 
704DESK - 무료 헬프스크 & ITSM
704DESK - 무료 헬프스크 & ITSM 704DESK - 무료 헬프스크 & ITSM
704DESK - 무료 헬프스크 & ITSM
아이티 쉐어드
 

What's hot (20)

ITN_Module_2.pptx
ITN_Module_2.pptxITN_Module_2.pptx
ITN_Module_2.pptx
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBCJava OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
 
08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24
08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 2408 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24
08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24
 
Polyspace CETIC presentation
Polyspace CETIC presentationPolyspace CETIC presentation
Polyspace CETIC presentation
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan Template
 
200 301-ccna
200 301-ccna200 301-ccna
200 301-ccna
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RS
 
Mobile application testing report
Mobile application testing reportMobile application testing report
Mobile application testing report
 
Ccna command
Ccna commandCcna command
Ccna command
 
2019.10.24 EC-CUBE関西UG 2系から4系への移行方法
2019.10.24 EC-CUBE関西UG 2系から4系への移行方法2019.10.24 EC-CUBE関西UG 2系から4系への移行方法
2019.10.24 EC-CUBE関西UG 2系から4系への移行方法
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabad
 
Galileo computing software testing
Galileo computing software testingGalileo computing software testing
Galileo computing software testing
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Selenium Handbook
Selenium HandbookSelenium Handbook
Selenium Handbook
 
Chapter 4 - Test Design Techniques
Chapter 4 - Test Design TechniquesChapter 4 - Test Design Techniques
Chapter 4 - Test Design Techniques
 
704DESK - 무료 헬프스크 & ITSM
704DESK - 무료 헬프스크 & ITSM 704DESK - 무료 헬프스크 & ITSM
704DESK - 무료 헬프스크 & ITSM
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Tosca explained
Tosca explainedTosca explained
Tosca explained
 
Home Health Revenue Cycle Management
Home Health Revenue Cycle ManagementHome Health Revenue Cycle Management
Home Health Revenue Cycle Management
 

Viewers also liked

Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
Joel Krebs
 

Viewers also liked (7)

Carlos Taborda / Launch Solid / - This is Exactly How I Killed My Startup
Carlos Taborda / Launch Solid / - This is Exactly How I Killed My Startup Carlos Taborda / Launch Solid / - This is Exactly How I Killed My Startup
Carlos Taborda / Launch Solid / - This is Exactly How I Killed My Startup
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version Control
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
 

Similar to Why Git Sucks and you'll use it anyways

Enterprise git
Enterprise gitEnterprise git
Enterprise git
Pedro Melo
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
Ailsa126
 

Similar to Why Git Sucks and you'll use it anyways (20)

GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git training
Git trainingGit training
Git training
 
Git Presentation
Git PresentationGit Presentation
Git Presentation
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git
GitGit
Git
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Git basics
Git basicsGit basics
Git basics
 
Git! Why? How?
Git! Why? How?Git! Why? How?
Git! Why? How?
 
Git basics
Git basicsGit basics
Git basics
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 
Git: be social
Git: be socialGit: be social
Git: be social
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
 
Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
 

Why Git Sucks and you'll use it anyways

  • 1. Git Sucks How git sucks and why you'll use it anyway
  • 2. Intro ● David Whittington ● Self Employed – xForty – ParentProxy
  • 3. Goals ● Convince you to at least try git ● Give you enough information to get started
  • 4. Experience? ● What VCS experience do you have? – RCS? – CVS/SVN? – Perforce? – Git/hg/bazaar?
  • 5. Version Control History ● In the beginning ... RCS – Lock – modify – unlock – Single file – Makes collaboration difficult
  • 6. Version Control History ● CVS/SVN – Copy – modify – merge – Central server – Makes forking + experimentation difficult
  • 7. Version Control History ● Distributed version control – Clone – modify – commit – fetch – merge ... – Lots of workflow options – Examples: Git, Mercurial, Bazaar-ng, Monotone
  • 8. What is Git? ● Distributed VCS system ● Created in 2005 by Torvalds following Bitkeeper fallout ● DAG based (as opposed to diff based)
  • 9. Git Sucks ● DVCS = complexity ● Unintuitive ● Documentation also distributed ● Code can be obtuse
  • 10. Why You'll Use it Anyway ● Distributed VCS is Good – Encourages contributions – Encourages experimentation (branches are easy) – Offline access rocks
  • 11. Why You'll Use it Anyway from http://blog.orebokech.com/2008/06/updated-debian-vcs-statistics.html
  • 12. Why You'll Use it Anyway ● These projects are using it: – Linux Kernel – X.org – Samba – Wine – Ruby on Rails – ... more at http://git.or.cz/gitwiki/GitProjects
  • 13. Why You'll Use it Anyway ● It really is powerful – Unixy – Fast – SVN bridge
  • 14. Why You'll Use it Anyway Github rocks!
  • 15. Why You'll Use it Anyway Hypnotoad Commands It!
  • 16. Using Git - Configuration $ git config --global user.name “David ...” $ git config --global user.email “djwhitt@...” $ git config --list user.name=”David Whittington” user.email=”djwhitt@gmail.com” $ cat ~/.gitconfig [user] name = David Whittington email = “djwhitt@gmail.com”
  • 17. Using Git – Cloning a Repo $ git clone git://github.com/rails/rails.git $ cd rails
  • 18. Using Git – Creating a Repo $ mkdir deathray $ cd deathray $ git init
  • 19. Using Git – Adding a File $ echo “deathray - a ray that kills” > README $ git add README $ git commit -m “initial commit”
  • 20. Using Git – Modifying a File $ echo “most awesome deathray ever” >> README $ git add README $ git commit -m “added detail to README” or ... $ echo “most awesome deathray ever” >> README $ git commit -a -m “added detail to README”
  • 21. Using Git – The Index Object Dir Index Working Dir Commits Trees Blobs Files Blobs
  • 22. Using Git – Branches $ git branch * master $ git branch fusion $ git branch fusion * master $ git checkout fusion $ git branch * fusion master
  • 23. Using Git – Branches
  • 24. Using Git – Branches $ echo “reactor core” > reactor $ git add reactor $ git commit -m “adding reactor” $ ls README reactor $ git checkout master $ ls README
  • 25. Using Git – Branches
  • 26. Using Git - Merging $ git branch fusion * master $ echo “focussing lens” > lens $ git add lens $ git commit -m “adding lens”
  • 27. Using Git - Merging
  • 28. Using Git - Merging $ git merge fusion
  • 29. Using Git - Merging
  • 30. Using Git - Rebasing $ git branch fusion * master $ echo “focussing lens” > lens $ git add lens $ git commit -m “adding lens”
  • 31. Using Git - Rebasing
  • 32. Using Git - Rebasing $ git rebase fusion
  • 33. Using Git - Rebasing
  • 34. Using Git – Git Status $ git status # Changed but not updated: # modified: lens # Untracked files: # amplifier
  • 35. Using Git – Git Log $ git log commit c23d31c9d34c7bf540a8e57f615f735f9ecdc2f2 Author: David Whittington <djwhitt@gmail.com> Date: Tue Oct 14 14:25:55 2008 -0400 adding lens ...
  • 36. Using Git - .gitignore $ cat .gitignore # swap files *.swp # temp dir /tmp
  • 37. Using Git - Aliases $ git config --global alias.co checkout $ git co fusion
  • 38. Using Git – Awesome Stuff $ git add --interactive $ git add --patch $ git stash
  • 39. Using Git - Github
  • 40. Using Git - Github
  • 41. Using Git - Github
  • 42. Using Git – Remote + Push $ git remote add github > git@github.com:djwhitt/deathray.git $ git push github master
  • 43. Using Git – Fetch, Merge, Pull $ git fetch github $ git merge github/master or... $ git pull github master
  • 44. Using Git - Tracking $ git config branch.master.remote github $ git config branch.master.merge github/master
  • 45. Stuff I Didn't Cover ● Workflow ● Conflicts ● Many more git commands ● Internals ● Other hosting options
  • 46. Resources ● http://git.or.cz/index.html ● http://git-scm.com/ ● http://www.gitcasts.com/ ● http://peepcode.com/ – screencast and pdf book – not free