Modern Version Control with Git

Slides:



Advertisements
Similar presentations
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Advertisements

1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Welcome to CS 115! Introduction to Programming Fall 2015.
Welcome to CS 115! Introduction to Programming. Class URL Please write this down!
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
CSE 501N Fall ‘09 00: Introduction 27 August 2009 Nick Leidenfrost.
COMP Introduction to Programming Yi Hong May 13, 2015.
Git – versioning and managing your software L. Grewe.
CS355 Advanced Computer Architecture Fatima Khan Prince Sultan University, College for Women.
F15 Modern Version Control with Git Andrew Benson Sign in on the attendance sheet!
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Sofia Event Center May 2014 Martin Kulov Git For TFS Developers.
Version Control System Lisa Palathingal 03/04/2015.
CS151 Introduction to Digital Design Noura Alhakbani Prince Sultan University, College for Women.
Version Control and SVN ECE 297. Why Do We Need Version Control?
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
CS102 Basic Computer Science and Programming Assoc. Prof. Jens Allmer Teaching Assistants: Canan Has, Caner Bağcı.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Welcome to CS 115! Introduction to Programming Spring 2016.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Introduction to Computers Spring 2017
CS5220 Advanced Topics in Web Programming Version Control with Git
4 Version control (part 1)
Course Overview - Database Systems
Information Systems and Network Engineering Laboratory II
L – Modeling and Simulating Social Systems with MATLAB
CS101 Computer Programming I
Discussion #11 11/21/16.
Git and GitHub primer.
Introduction to Programming
Version Control.
L – Modeling and Simulating Social Systems with MATLAB
CS4961 Software Design Laboratory I Collaboration using Git and GitHub
IST256 : Applications Programming for Information Systems
Code Management Releases
Discussion 11 Final Project / Git.
L – Modeling and Simulating Social Systems with MATLAB
Git for Visual Studio Developers MARTIN KULOV, ASE
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control System using Git
L – Modeling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
Development and Deployment
Version Control with Git and GitHub
US 130 Principles of Urban Sustainability
Introduction to Programming Spring 2016
Computer Science 102 Data Structures CSCI-UA
Version Control with Git accelerated tutorial for busy academics
Welcome to CS 1010! Algorithmic Problem Solving.
Course Overview - Database Systems
Welcome to CS 1010! Algorithmic Problem Solving.
Introduction to Computers Fall 2017
Computer Systems Programming
Introduction to Computers SPRING 2019
Git CS Fall 2018.
Version control with Git
CMPE/SE 131 Software Engineering February 14 Class Meeting
Version Control Software
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Version Control with Git and GitHub
Version Control with Git
Computer Science Practicum – Writing Intensive
Keeping your SQL Code safe
Introduction to The Git Version Control System
CS201 – Course Expectations
Presentation transcript:

Modern Version Control with Git 98-174 F17 Modern Version Control with Git Aaron Perley (aperley@andrew.cmu.edu) https://www.andrew.cmu.edu/course/98-174/

Why should you take this course? “Version control software is an essential part of the every-day of the modern software team's professional practices.” -- Atlassian Git Tutorial

Why should you take this course? From a 2013 Fox News report:

Git ≠ Github ≠

What this course isn’t For seasoned Linuxbeards

What this course isn’t A crashcourse on git commands

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

Course Website https://www.andrew.cmu.edu/course/98-174/ Last semester’s schedule: https://www.andrew.cmu.edu/course/98-174/s17/

Grade Breakdown Pass/No Credit, like every StuCo. To pass, get 70% out of: 20% Weekly Lecture Attendance (Tuesdays 6:30PM – 7:20PM, Baker Hall 140F) 30% Submitted work (often in-class) 20% Midterm (Date TBA) 30% Final (Date TBA)

More Course Details No prerequisites 3 Free Elective credits No official textbook, but we recommend Pro Git by Scott Chacon (free, online) No office hours unless specifically requested Email Aaron (aperley@andew.cmu.edu) if you have questions Slides and lecture notes posted online

Course Policy By StuCo Policy, students with more than 2 unexcused absences must be given a No Pass in the course. Thus, email us 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. Don’t be late. Academic integrity applies. Don’t cheat. No late homework.

Waitlist If you are on the waitlist, please keep coming to class. There is a 99.9% chance you will be able to get in off the waitlist

What is Version Control?

Goals of Version Control Be able to search through revision history and retrieve previous versions of any file in a project Be able to share changes with collaborators on a project Be able to confidently make large changes to existing files https://www.atlassian.com/git/tutorials/what-is-version-control

Named Folders Approach Easy Familiar … Can be hard to track Memory-intensive Can be slow Hard to share No record of authorship

Centralized Version Control Systems A central repository determines the order of versions of the project Collaborators “push” changes to the files to the repository Any new changes must be compatible with the most recent version of the repository. If it isn’t, somebody must “merge” it in. Examples: SVN, CVS, Perforce

Distributed Version Control System Distributed Version Control Systems (DVCS) No central repository, each developer has their own copy Developers work on their own copy of the repository locally and sync changes with others Examples: Git, Mercurial Dev A’s Repo Dev B’s Repo Dev C’s Repo Dev D’s Repo Commit Push/Fetch Distributed Version Control System

Git Created in 2005 by Linus Torvalds to maintain the Linux kernel. Oh, and he created that too. Distributed VCS https://www.git-scm.com/

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

Git Init Initializes a new git repository in an existing folder The folder is now called a git repository Changes to any files in the folder (and its subfolders) can be tracked by git Git stores its metadata in a hidden .git folder in the repository root $ mkdir myrepo $ cd myrepo $ git init

Git Clone Download an existing repository (and all of its history!) $ cd Autolab

Git Log List the history of a repository $ git log Press ‘q’ to exit, use arrow keys (or j,k) to scroll

What is fad72e4? Commits are uniquely represented by SHA-1 hashes The first 6-7 characters of a hash are usually enough to identify it uniquely from all the other commits in the repository This is called the short hash

Okay, so what is a commit? A snapshot of all the files in a project at a particular time. A checkpoint in your project you can come back to or refer to. Anything else? The changes a commit makes over the previous commit

Homework One hour or less a week Released on Tuesdays after class, due next Tuesday at beginning of class Posted on the course website Email me (aperley@andrew.cmu.edu) if you have questions, I’ll be happy to help you out!