SlideShare a Scribd company logo
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?
Ad

More Related Content

What's hot (20)

Packages in java
Packages in javaPackages in java
Packages in java
jamunaashok
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at Rest
Mydbops
 
Ansible
AnsibleAnsible
Ansible
Knoldus Inc.
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020
Noa Harel
 
Data Warehouse on Kubernetes: lessons from Clickhouse Operator
Data Warehouse on Kubernetes: lessons from Clickhouse OperatorData Warehouse on Kubernetes: lessons from Clickhouse Operator
Data Warehouse on Kubernetes: lessons from Clickhouse Operator
Altinity Ltd
 
FullStack Embedded IoT Course
FullStack Embedded IoT Course FullStack Embedded IoT Course
FullStack Embedded IoT Course
Emertxe Information Technologies Pvt Ltd
 
Docker containers
Docker containersDocker containers
Docker containers
Pau López
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Java packages
Java packagesJava packages
Java packages
Shreyans Pathak
 
Assembler
AssemblerAssembler
Assembler
Temesgen Molla
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
Suraj Khetani
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
George Shuklin
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
josemachoco
 
Nextjs13.pptx
Nextjs13.pptxNextjs13.pptx
Nextjs13.pptx
DivyanshGupta922023
 
Designing High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWSDesigning High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWS
☁ Bryan Krausen
 
Highly available (ha) kubernetes
Highly available (ha) kubernetesHighly available (ha) kubernetes
Highly available (ha) kubernetes
Tarek Ali
 
C program to write c program without using main function
C program to write c program without using main functionC program to write c program without using main function
C program to write c program without using main function
Rumman Ansari
 
Steering the Course with Helm
Steering the Course with HelmSteering the Course with Helm
Steering the Course with Helm
Dirk Jablonski
 
Packages in java
Packages in javaPackages in java
Packages in java
jamunaashok
 
MySQL Data Encryption at Rest
MySQL Data Encryption at RestMySQL Data Encryption at Rest
MySQL Data Encryption at Rest
Mydbops
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020What's New for GitLab CI/CD February 2020
What's New for GitLab CI/CD February 2020
Noa Harel
 
Data Warehouse on Kubernetes: lessons from Clickhouse Operator
Data Warehouse on Kubernetes: lessons from Clickhouse OperatorData Warehouse on Kubernetes: lessons from Clickhouse Operator
Data Warehouse on Kubernetes: lessons from Clickhouse Operator
Altinity Ltd
 
Docker containers
Docker containersDocker containers
Docker containers
Pau López
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
Suraj Khetani
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
George Shuklin
 
JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
josemachoco
 
Designing High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWSDesigning High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWS
☁ Bryan Krausen
 
Highly available (ha) kubernetes
Highly available (ha) kubernetesHighly available (ha) kubernetes
Highly available (ha) kubernetes
Tarek Ali
 
C program to write c program without using main function
C program to write c program without using main functionC program to write c program without using main function
C program to write c program without using main function
Rumman Ansari
 
Steering the Course with Helm
Steering the Course with HelmSteering the Course with Helm
Steering the Course with Helm
Dirk Jablonski
 

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
Carlos Taborda
 
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
Chris Muir
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Lukas Fittl
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
Yoad Snapir
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Randal Schwartz
 
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
Rohit Arora
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
Joel Krebs
 
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
Carlos Taborda
 
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
Chris Muir
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Lukas Fittl
 
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
Rohit Arora
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
Joel Krebs
 
Ad

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

GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
Supachai Vorrasing
 
Git presentation
Git presentationGit presentation
Git presentation
James Cuzella
 
Git training
Git trainingGit training
Git training
adm_exoplatform
 
Git Presentation
Git PresentationGit Presentation
Git Presentation
Prem Aseem Jain
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
Git
GitGit
Git
Gayan Kalanamith Mannapperuma
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
Juergen Fesslmeier
 
Git! Why? How?
Git! Why? How?Git! Why? How?
Git! Why? How?
Daniel Kummer
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
Stacy Vicknair
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
Pedro Melo
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
lanhuonga3
 
Git: be social
Git: be socialGit: be social
Git: be social
Geronimo Orozco
 
Git-guidance for beginner- IT support.pptx.pptx
Git-guidance for beginner- IT support.pptx.pptxGit-guidance for beginner- IT support.pptx.pptx
Git-guidance for beginner- IT support.pptx.pptx
vietnguyen1989
 
Git-guidance for beginner- IT support.pptx
Git-guidance for beginner- IT support.pptxGit-guidance for beginner- IT support.pptx
Git-guidance for beginner- IT support.pptx
vietnguyen1989
 
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
Rifauddin Tsalitsy
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
Alberto Leal
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
Ailsa126
 
Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
ozone777
 
Ad

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=”[email protected]” $ cat ~/.gitconfig [user] name = David Whittington email = “[email protected]
  • 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 <[email protected]> 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 > [email protected]: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