Why Git Sucks and you'll use it anyways

15,369 views

Published on

I found these slides on the internet, and wanted to share them.

I personally love Git, but they seem interesting to hear the opinion from someone back in '08.

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
15,369
On SlideShare
0
From Embeds
0
Number of Embeds
631
Actions
Shares
0
Downloads
56
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Why Git Sucks and you'll use it anyways

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

×