modern version control with git
play

Modern Version Control with Git Andrew Benson - PowerPoint PPT Presentation

98-174 F16 Modern Version Control with Git Andrew Benson adbenson@andrew.cmu.edu https://www.andrew.cmu.edu/course/98-174/ Why should you take this course? Why should you take this course? A recent headline from Fox News: Git Github


  1. 98-174 F16 Modern Version Control with Git Andrew Benson adbenson@andrew.cmu.edu https://www.andrew.cmu.edu/course/98-174/

  2. Why should you take this course?

  3. Why should you take this course? A recent headline from Fox News:

  4. Git ≠ Github ≠

  5. What this course isn’t • For seasoned Linuxbeards

  6. What this course isn’t • A crashcourse on git commands

  7. What this course is about • Forming a mental model for how git interacts with versions of files • Understanding how to use git (and a bit of Github) in a collaborative setting

  8. Last Semester's Schedule

  9. Course Website https://www.andrew.cmu.edu/course/98-174/

  10. Grade Breakdown Pass/No Credit, like every StuCo. To pass, get 70% out of: • 20% Weekly Lectures (Mondays 8:00-8:50pm, Doherty 1117) • 30% Submitted work (often in-class) • 20% Midterm (Date TBA) • 30% Final (Date TBA)

  11. More Course Details • Prerequisite: Basic Unix Survival • 3 Free Elective credits • No official textbook, but I recommend Pro Git by Scott Chacon • No office hours unless specifically requested • Slides and lecture notes posted online

  12. Course Policy • By StuCo Policy, students with more than 2 unexcused absences must be given a No Pass in the course. Thus, tell me if you’re going to miss class for a legitimate reason, and you might get an excused absence. • More than 15 minutes late = unexcused absence • Academic integrity applies. Don’t cheat. • No late homework.

  13. Waitlists

  14. What is Version Control?

  15. Goals of Version Control • Be able to retrieve previous versions of any file in a project • Be able to share changes with collaborators on a project

  16. Lots of Zip Files • Memory-intensive • Can be slow • Can be hard to track

  17. Local Database of Versions • Provides an abstraction over finding the right versions of files and replacing them in the project • Can’t share with collaborators

  18. Centralized Version Control Systems Central, Blessed Repository • A central, blessed repository determines the order of commits Patch Z (“versions” of the project) • Collaborators “push” changes … Patch α (commits) to this repository. Patch C Any new patches must • Any new commits must be be compatible with compatible with the most recent the latest version Patch B of the central repo, commit. If it isn’t, somebody must Patch Z Patch A “merge” it in original file from my project

  19. Distributed Version Control Systems • No central repository • Every repository has every commit Commit Commit Developer Developer Dev A’s local B’s local Push/Fetch files files C’s Commit Dev Commit Repo A’s Checkout Checkout Push/Fetch Repo Central Push/Fetch Commit Push/Fetch Repository Commit Commit Dev Push/Fetch D’s Checkout Checkout Developer Developer Repo Dev C’s local D’s local files files B’s Push/Fetch Repo Centralized Distributed Version Control Commit Version Control System System

  20. Git • Created in 2005 by Linus Torvalds to maintain the Linux kernel. Oh, and he created that too. • Distributed VCS

  21. Installing Git • https://www.andrew.cmu.edu/course/98-174/lecturenotes/installing_git.html

Recommend


More recommend