GIT, VERSION CONTROL,       AND YOU.An introduction to the tastiest version control system.                         Ever. ...
WHATCHU TALKIN’ ‘BOUT?•   Who is this guy?•   What is Git?•   More importantly, what’s source control?•   Why do I need it...
WHO IS THIS GUY?• Jeff   Byrnes• Web  Developer (self-  taught; HTML/CSS/PHP/JS)• Trained  Musician (upright &  electric b...
WHAT IS GIT?•A   distributed version control system• Created   by Linus Torvalds, the guy behind Linux• Used   by lots of ...
SOURCE CONTROL?• Ever   heard of this website?
SOURCE CONTROL?  • Source    control is like a wiki for your text  • Lots   of different systems (here’s three):    • CVS ...
SOURCE CONTROL?                                              Server• Oldersystems (CVS, Subversion) are centralized• Netwo...
SOURCE CONTROL?                                      Server• Git(and a few others) are distributed• Thismeans every copy o...
SOURCE CONTROL? • Well     great, Jeff, but what if I’m a one-person operation? • It’s   also fast. Like whoa fast. • It a...
THE SWEET•A   history of your changes• Line-by-line   changes• Cheap   branching• No   server needed
THE NO-SO-SWEET• Not great for binary files  (images, movies, etc.)• Lots    to learn• Still      very much a  programmer’s...
GET THE PARTY STARTED  • Install   & identify yourself    • Mac     & Linux users: rejoice    • Windows        users: I’m ...
AT YOUR COMMAND• git   add• git   commit• git   branch• git   merge• git   push / git pull
BACK TO THE FUTURE                      (THINK, MCFLY, THINK!)• Lots   of commands to undo• Here’s   the two basic ones:  ...
BRANCH ME •A    branch is a separate    strand of work • Think   features, bug fixes,    flights of fancy • git  checkout -b...
EMBRACE CONFLICT                     (MERGES AREN’T SCARY)• Git   is conservative• Git   always defers to your judgment• T...
MORE RESOURCES• Git - git-scm.com• Git Book - book.git-scm.com•   Successful branching model - nvie.com/posts/a-successful...
Upcoming SlideShare
Loading in …5
×

Harvard ABCD-WWW Git presentation

1,544 views
1,419 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,544
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Harvard ABCD-WWW Git presentation

  1. 1. GIT, VERSION CONTROL, AND YOU.An introduction to the tastiest version control system. Ever. Courtesy of Jeff Byrnes jeff@jeffbyrn.es
  2. 2. WHATCHU TALKIN’ ‘BOUT?• Who is this guy?• What is Git?• More importantly, what’s source control?• Why do I need it?• What makes Git so uber-sweet? And no so sweet?• Get the party started• Command me, o Git• Back to the Future• Branch me, baby• Embracing conflict• More resources
  3. 3. WHO IS THIS GUY?• Jeff Byrnes• Web Developer (self- taught; HTML/CSS/PHP/JS)• Trained Musician (upright & electric bass)• Learned Git in just a few months, and now I’m here to share!
  4. 4. WHAT IS GIT?•A distributed version control system• Created by Linus Torvalds, the guy behind Linux• Used by lots of people, big to small (think Google, Twitter, etc.)• Especially popular amongst open-source projects • GitHub, anyone? jQuery, Linux, etc.
  5. 5. SOURCE CONTROL?• Ever heard of this website?
  6. 6. SOURCE CONTROL? • Source control is like a wiki for your text • Lots of different systems (here’s three): • CVS • Subversion • MercurialSorry, there isn’t a logo for CVS. It was made way back when logos weren’t cool.
  7. 7. SOURCE CONTROL? Server• Oldersystems (CVS, Subversion) are centralized• Network access is required Committer Committer• Everyone is dependent on the server
  8. 8. SOURCE CONTROL? Server• Git(and a few others) are distributed• Thismeans every copy of the repository is a clone Clone Clone• Soyou can run off on your own & go nuts, or even push/pull to each other
  9. 9. SOURCE CONTROL? • Well great, Jeff, but what if I’m a one-person operation? • It’s also fast. Like whoa fast. • It also tracks changes on a line-by-line basis, instead of on a file-by-file basisGive some examples of how line-by-line rocks the hizzouse
  10. 10. THE SWEET•A history of your changes• Line-by-line changes• Cheap branching• No server needed
  11. 11. THE NO-SO-SWEET• Not great for binary files (images, movies, etc.)• Lots to learn• Still very much a programmer’s tool
  12. 12. GET THE PARTY STARTED • Install & identify yourself • Mac & Linux users: rejoice • Windows users: I’m sorry • git init • That’s it.Be sure to go over git config --global for username & email
  13. 13. AT YOUR COMMAND• git add• git commit• git branch• git merge• git push / git pull
  14. 14. BACK TO THE FUTURE (THINK, MCFLY, THINK!)• Lots of commands to undo• Here’s the two basic ones: • git revert • git reset
  15. 15. BRANCH ME •A branch is a separate strand of work • Think features, bug fixes, flights of fancy • git checkout -b branchnameBranches are cheap, and should be used wildly. Explain how checking out a branch changesthe whole working tree.
  16. 16. EMBRACE CONFLICT (MERGES AREN’T SCARY)• Git is conservative• Git always defers to your judgment• Throws a merge conflict if it even thinks something is awry• GUItools (e.g., Tower, Sourcetree, TortoiseGit) make merges way easier
  17. 17. MORE RESOURCES• Git - git-scm.com• Git Book - book.git-scm.com• Successful branching model - nvie.com/posts/a-successful-git- branching-model/• Git Ready - gitready.com• Get Started w/ Git - alistapart.com/articles/get-started-with-git/• Git Reference - gitref.org• Think Like A Git - think-like-a-git.net• Interactive Git Cheatsheet - ndpsoftware.com/git-cheatsheet.html

×