Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git in 5 Minutes

Rob Dumas
February 13, 2013

Git in 5 Minutes

A shorter version of my earlier talk, this time presented at Code4Lib 2013. You can also view the video of me giving the talk on Archive.org. http://archive.org/details/Code4libRobDumas

Rob Dumas

February 13, 2013
Tweet

More Decks by Rob Dumas

Other Decks in Programming

Transcript

  1. ✓ what files have changed ✓ who made those changes

    ✓ when the changes were made ✓ how those changed files differ ✓ why they were changed (hopefully) version control
  2. ✓free & open source ✓local & distributed ✓fast & secure

    ✓stable & popular what’s so great about git?
  3. getting git installing it baked right in textmate bundle xcode

    and more! eclipse plugin use homebrew mxcl.github.com/homebrew use apt-get or yum download it git-scm.com/downloads
  4. staging changes $  git  add  myfile.html $  git  add  css/*

    you have to stage your changes each time you commit!
  5. other commands $  git  log $  git  diff  a65fe40 $

     git  rm $  git  mv commit hash
  6. branching $  git  branch  child $  git  checkout  child 1.

    create child branch 2. check out child branch 3. work on new branch
  7. merging $  git  checkout  parent $  git  merge  child 1.

    check out parent branch 2. merge child branch into parent
  8. tagging $  git  tag  -­‐a  v1.0  -­‐m  "Product  release" $

     git  tag  -­‐a  ronburgundy  -­‐m  "Brick      killed  a  guy  with  a  trident." master development v1.0
  9. distributed git shared repository developer developer developer $  git  pull

     origin  master $  git  push  origin  master
  10. Version Control with Git 2nd. Edition by Loeliger & McCullough

    © 2012 O’Reilly Media ISBN 978-1-4493-1638-9 r2d.to/oreillygitbook