Modern Version Control with Git Andrew Benson - - PowerPoint PPT Presentation

modern version control with git
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

98-174 F16 Modern Version Control with Git

Andrew Benson adbenson@andrew.cmu.edu https://www.andrew.cmu.edu/course/98-174/

slide-2
SLIDE 2

Why should you take this course?

slide-3
SLIDE 3

Why should you take this course?

A recent headline from Fox News:

slide-4
SLIDE 4

Git ≠ Github

slide-5
SLIDE 5

What this course isn’t

  • For seasoned Linuxbeards
slide-6
SLIDE 6

What this course isn’t

  • A crashcourse on git commands
slide-7
SLIDE 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

slide-8
SLIDE 8

Last Semester's Schedule

slide-9
SLIDE 9

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

slide-10
SLIDE 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)
slide-11
SLIDE 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
slide-12
SLIDE 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.
slide-13
SLIDE 13

Waitlists

slide-14
SLIDE 14

What is Version Control?

slide-15
SLIDE 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
slide-16
SLIDE 16

Lots of Zip Files

  • Memory-intensive
  • Can be slow
  • Can be hard to track
slide-17
SLIDE 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
slide-18
SLIDE 18

Centralized Version Control Systems

  • A central, blessed repository

determines the order of commits (“versions” of the project)

  • Collaborators “push” changes

(commits) to this repository.

  • Any new commits must be

compatible with the most recent

  • commit. If it isn’t, somebody must

“merge” it in

  • riginal file

from my project Patch A Patch C Patch B … Patch Z Central, Blessed Repository Patch α Any new patches must be compatible with the latest version

  • f the central repo,

Patch Z

slide-19
SLIDE 19

Central Repository

Developer A’s local files Developer D’s local files Developer C’s local files Developer B’s local files Commit Checkout Checkout Commit Commit Commit Checkout Checkout

Dev A’s Repo Dev B’s Repo Dev C’s Repo Dev D’s Repo

Commit Commit Commit Commit Push/Fetch Push/Fetch Push/Fetch Push/Fetch Push/Fetch Push/Fetch

Centralized Version Control System Distributed Version Control System

Distributed Version Control Systems

  • No central repository
  • Every repository has every commit
slide-20
SLIDE 20

Git

  • Created in 2005 by Linus Torvalds to maintain the Linux kernel.

Oh, and he created that too.

  • Distributed VCS
slide-21
SLIDE 21

Installing Git

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