git

 git

Introduction to Git. A presentation I gave at local user-groups.

B5009f255a6f0c386d40d6143948df8e?s=128

Mindaugas Mozūras

March 21, 2012
Tweet

Transcript

  1. git or: how I learned to stop worrying and love

    source control
  2. why you should care

  3. Traditional version control systems have deficiencies

  4. Subversion, Perforce, CVS, TFS...

  5. OH, THE PAIN! SLOW TREE CONFLICTS MERGING IS CHALLENGING BRANCHES

    ARE JUST COPIES
  6. using svn

  7. using git

  8. is awesome git

  9. It’s distributed! Distributed Version Control System

  10. Every repository is equal.

  11. You can work offline.

  12. Fast as lightning.

  13. add status diff log commit branch git mercurial bazaar

  14. Very efficient. git clone rails - 53 seconds 40mb, 2356

    files, 29045 commits
  15. Great branching and merging.

  16. Any workflow you want, you got it...

  17. Shared repository

  18. Blessed repository Linus Torvalds Lieutenants Developers

  19. everyone uses git

  20. 14% 29% 55% GitHub SourceForge Google Code CodePlex Total number

    of commits 2011.01 - 2011.05
  21. automapper backbone bootstrap cassandra coffeescript couchdb cucumber fluent-nhibernate git jekyll

    less linux modernizr mongodb mono nancy ninject node nservicebus rails ravendb reddit
  22. how toinstall

  23. Linux: apt-get install git-core Mac OS X: brew install git

    Windows: chocolatey install msysgit
  24. getting started

  25. git config --global user.name ... git config --global user.email ...

  26. git init

  27. master has no special meaning. It’s just a default branch.

  28. git add --all

  29. git commit

  30. 189f30b664981e4397625791c8ea3bbb5f2279a3 Commit “name” is a 40-digit SHA

  31. There are four types of objects: tag, commit, tree and

    blob.
  32. git remote add origin git@git...

  33. git push origin master

  34. HEAD is a reference to the last commit in the

    current branch.
  35. git pull origin master

  36. Basic training complete.

  37. and history branching

  38. git branch name

  39. Branch is a reference to the head of a line

    of work.
  40. git checkout name

  41. git merge name

  42. git reset --hard commit

  43. git rebase name

  44. merge is fine, but in a lot of cases, rebase

    is better.
  45. git commit --amend

  46. git rebase --interactive

  47. Interactive rebase lets you: reword, edit, squash, fixup, exec, remove

    and reorder.
  48. You can change history of remote repository with git push

    --force. Be careful!
  49. Rewriting history is fun and useful!

  50. svn git-

  51. git svn clone http://...

  52. git svn rebase ~ svn update

  53. git svn dcommit ~ svn commit

  54. GitHub

  55. The best way to collaborate.

  56. ~1.5 million people, ~2.5 million repositories.

  57. Phil Haack, Adam Roben, Paul Betts are GitHubbers

  58. github.com/Haacked/SeeGit GitHub for Windows...?

  59. thoughts closing

  60. blame bisect cherry-pick clean cvsimport describe diff fetch filter-branch grep

    request-pull revert svnimport stash submodule tag and more...
  61. progit.org gitready.com gitimmersion.com ontwik.com/category/git-github RESOURCES

  62. https://git.wiki.kernel.org/articles/i/n/t/ Interfaces,_frontends,_and_tools.html TortoiseGit Git Extensions Git Source Control Provider TOOLS

  63. Git != Subversion + Magic

  64. The slogan of Subversion for a while was "CVS done

    right". If you start with that kind of slogan, there's nowhere you can go. There is no way to do CVS right. Linus Torvalds
  65. Zach Holman @holman thenounproject.com thanks to:

  66. twitter.com/mmozuras github.com/mmozuras thanks!