Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Git! Why? How?

1,469 views

Published on

Why should you use git today instead of centralized version management systems like svn.

Published in: Technology
  • Be the first to comment

Git! Why? How?

  1. 1. git!why?how? daniel.kummer@namics.com   October  2011  
  2. 2. VCShistory
  3. 3. Svn revisited
  4. 4. Basic svn workflowSo, what’s wrong with this?
  5. 5. When……did you last branch?…was your last merge?…were you stressed by a broken commit*?* commited by someone else of course
  6. 6. It began with the linux kernel…•  Birthday April 3, 2005•  Linus Torvalds invented it “over night”, after BitKeeper became proprietary•  Tech-Talk: Linus Torvalds on git www.youtube.com/watch?v=4XpnKHJAok8
  7. 7. Git is optimized for…Distributed developmentLarge file setsMerge complex structuresBranchingFast operationsRobustness
  8. 8. Torvalds’ design criteria
  9. 9. What’s git
  10. 10. Git isbetterthansvn!
  11. 11. Corefeatures
  12. 12. How does it work?•  SHA-1 is King –  Universal public identifier –  Every object has it (Blobs, Trees Commits, Tags)•  Multiple protocols – http ssh git•  Efficient object store•  Disk is cheap – everyone has entire repo•  Easy branching and merging
  13. 13. Snapshots, Not Differences GitSvn
  14. 14. Not centralized…Svn
  15. 15. …distributed! G it
  16. 16. Workingwith git
  17. 17. Staging area –“index” or“cache”
  18. 18. BranchingBest practice
  19. 19. Into the ring!
  20. 20. Git @ Namicsknow.namics   git.namics   (scm.namics)  • buildrun/Git • ssh  public  key   • Git   +bei+Namics   authenBcaBon   • SVN  • Schnipsel   • access?   • Jenkins   contact  a  git   • Bamboo   admin   • Jira   • LDAP  
  21. 21. Cool Stuff
  22. 22. Tons of Toolsgit-archive Export a tree as tar/zipgit-bisect Find broken commitgit-cherry-pick Selective merginggit-revert Add a second revert commitgit-blame Who wrote this?
  23. 23. Bash aliases - I’m lazy!alias ga=git add .alias gcam=git commit -amalias grh=git reset HEAD --hardalias gs=git statusalias gb=git branchalias gc=git checkoutalias gcm=git checkout masteralias gcs=git checkout stagingalias gcd=git checkout developmentalias gph=git pushalias gpt=git push --tagsalias gpl=git pullalias gm=git mergealias gmm=git merge masteralias gms=git merge stagingalias gmd=git merge developmentalias gba=git branch -aalias gt=git tagalias gpt=git push --tagsalias garc=git archive HEAD --format=zip >
  24. 24. AutocompleteDownload fileh"ps://raw.github.com/git/git/master/contrib/comple6on/git-­‐comple6on.bash  Add to bash_profile$ source ~/.git-completion.bash
  25. 25. Graphical clients
  26. 26. SourceTree - OSX GET WH IT ILE I FREE T’S !
  27. 27. Tower - OSX
  28. 28. SmartGit - WIN
  29. 29. Save   Keep   Bme   Backup   order   Save   space  Work   What’s the gainoffline   for Namics?
  30. 30. ResourcesGreat Book, and its free! http://progit.org/Cheatsheets http://www.ndpsoftware.com/git-cheatsheet.html http://byte.kde.org/~zrusin/git/git-cheat-sheet.svg http://help.github.com/git-cheat-sheets/Your search engine of choice…
  31. 31. drop svnanduse git!http://know.namics.com/display/buildrun/Git+bei+Namics

×