Your SlideShare is downloading. ×
  • Like
M.Mozūras - git
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
753
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. git or: how I learned to stopworrying and love source control
  • 2. why you should care
  • 3. Traditional version controlsystems have deficiencies
  • 4. Subversion, Perforce, CVS, TFS...
  • 5. OH, TSLOW HE PATREE CONFLICTS IN!MERGING IS CHALLENGINGBRANCHES ARE JUST COPIES
  • 6. using svn
  • 7. using git
  • 8. git is awesome
  • 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 seconds40mb, 2356 files, 29045 commits
  • 15. Great branching and merging.
  • 16. Any workflow you want,you got it...
  • 17. Shared repository
  • 18. Linus Torvalds Blessed repositoryLieutenantsDevelopers
  • 19. how to install
  • 20. Linux: apt-get install git-coreMac OS X: brew install gitWindows: chocolatey install msysgit
  • 21. Download from git-scm.com
  • 22. gettingstarted
  • 23. git config --global user.name ...git config --global user.email ...
  • 24. git init
  • 25. master has no special meaning.It’s just a default branch.
  • 26. git add
  • 27. Staging area stores info aboutwhat will go into next commit.
  • 28. working staging area repositorydirectory checkout the project stage files commit
  • 29. git commit
  • 30. Commit “name” is a 40-digit SHA189f30b664981e4397625791c8ea3bbb5f2279a3
  • 31. commit 189f30b... tree e8455...parent(s) nil author Mindaugas...committer Mindaugas... Initial commit
  • 32. tree e8455...blob bc52a... README.md
  • 33. blob bc52a...
  • 34. SVN, CVS, Perforce storedifferences between commits.
  • 35. Git stores snapshots.
  • 36. commit0 commit1 commit2 tree0 tree1 tree2blob A blob A blob A2 blob B blob B2 blob B2
  • 37. Basictrainingcomplete.
  • 38. pushing and pulling
  • 39. git remote add origin git@git...
  • 40. git push origin master
  • 41. git pull origin master
  • 42. branching and merging
  • 43. git branch name
  • 44. Branch is a reference to thehead of a line of work.
  • 45. masterC0 C1 feature
  • 46. git checkout name
  • 47. git merge name
  • 48. masterC0 C1 C2 F1 F2 feature
  • 49. masterC0 C1 C2 C3 F1 F2 feature
  • 50. git rebase name
  • 51. masterC0 C1 C2 F1 F2 feature
  • 52. masterC0 C1 F1 F2 C2 feature
  • 53. merge is fine, but in a lot ofcases, rebase is better.
  • 54. Branching - too easy not to do
  • 55. manipulatinghistory
  • 56. git commit --amend
  • 57. git rebase --interactive
  • 58. Interactive rebase lets you:reword, edit, squash, fixup,exec, remove and reorder.
  • 59. Be carefu l!You can change history of remoterepository with git push --force.
  • 60. Rewritinghistory is funand useful!
  • 61. git- svn
  • 62. git svn clone http://...
  • 63. git svn rebase ~ svn update
  • 64. git svn dcommit ~ svn commit
  • 65. GitHub
  • 66. The best way to collaborate.
  • 67. More than 1.6 million people, 2.8 million repositories.
  • 68. Used by individuals.
  • 69. And organizations.
  • 70. closing thoughts
  • 71. blame bisect cherry-pick cleancvsimport describe diff fetchfilter-branch grep request-pullrevert svnimport stashsubmodule tag and more...
  • 72. RESgit-scm.com OURgitready.com CESgitimmersion.comontwik.com/category/git-github
  • 73. Git != Subversion + Magic
  • 74. The slogan of Subversion for awhile was "CVS done right". If youstart with that kind of slogan,theres nowhere you can go. Thereis no way to do CVS right. Linus Torvalds
  • 75. thanks to:Zach Holman @holmanthenounproject.com
  • 76. thanks!codingfearlessly.comtwitter.com/mmozurasgithub.com/mmozuras