4 Version control (part 1)

Slides:



Advertisements
Similar presentations
Version Control What it is and why you want it. What is Version Control? A system that manages changes to documents, files, or any other stored information.
Advertisements

Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
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
Fundamentals of Git By Zachary Ling 29 th, Aug,
Introduction to Version Control with SVN & Git CSC/ECE 517, Fall 2012 Titus Barik & Ed Gehringer, with help from Gaurav.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
GIT An introduction to GIT Source Control. What is GIT (1 of 2) ▪ “Git is a free and open source distributed version control system designed to handle.
Version Control. What is it? Software to help keep track of changes made to files Tracks the history of your work Helps you collaborate with others.
Version control Using Git Version control, using Git1.
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to Version Control with Git CSC/ECE 517, Fall 2014 A joint project of the CSC/ECE 517 staff, including Titus Barik, Gaurav Tungatkar, Govind.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
Sofia Event Center May 2014 Martin Kulov Git For TFS Developers.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
An Introduction to Git David Johndrow COMP 490 – Senior Design & Development 2/11/16.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
DIGITAL REPOSITORIES CGDD Job Description… Senior Tools Programmer – pulled August 4 th, 2011 from Gamasutra.
Version Control Jose Caraballo. What is version Control?
Jun-Ru Chang Introduction GIT Jun-Ru Chang
Collaborative Git An introduction to Git with others
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
GIT: (a)Gentle InTroduction Bruno Bossola. Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A.
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Dr. Tanusri Bhattacharya
CompSci 230 Software Construction
CS5220 Advanced Topics in Web Programming Version Control with Git
Introduction to Version Control with Git
Git and GitHub primer.
11 Version control (part 2)
LECTURE 2: Software Configuration Management
Code Management Releases
Source Control Dr. Scott Schaefer.
Version Control with Subversion (SVN)
Version control, using Git
Modern Version Control with Git
Git for Visual Studio Developers MARTIN KULOV, ASE
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control System using Git
Development and Deployment
Concurrent Version Control
Version Control System
An introduction to version control systems with Git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
LECTURE 3: Software Configuration Management
Introduction to Configuration Management
An introduction to version control systems with Git
Subclipse CSCI 3130 Summer 2016.
Git CS Fall 2018.
Version control with Git
Introduction to Version Control with Git
CMPE/SE 131 Software Engineering February 14 Class Meeting
Version Control Software
Version Control with Git
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Systems Analysis and Design I
Version Control with Git
Git Introduction.
Introduction To GitHub
Presentation transcript:

4 Version control (part 1) Objektorienterade applikationer d2, förel. 4 4 Version control (part 1) (Hodson: 1, Chacon: 1-2) DAT055, 16/17, lp 3

Main concepts to be covered Objektorienterade applikationer d2, förel. 4 Main concepts to be covered Local version control Centralized version control Distributed version control Systems for version control Version control principles and concepts Version control with GIT Distributed workflow Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Why version control? Manual file handling does not scale well for large projects. None or weak support for cooperation or distributed work. A simple linear development thread is the only realistic workflow. Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Local version control Files maintained manually in directories. Error prone. In the rcs system, patch sets are used to keep track of the versions of a file. Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Centralized version control Objektorienterade applikationer d2, förel. 4 Centralized version control One single repository runs on a server. All developers are depending on the availability of the server. Project stops if the server crashes. Central VCS server Version database Version 1 Version 2 Version 3 Computer A file Computer B Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Distributed version control Objektorienterade applikationer d2, förel. 4 Distributed version control Developers work independently on own complete copies of the project files. Lower risk for data loss due to crashes. Efficient since most changes are performed on local copies. Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Distributed version control Objektorienterade applikationer d2, förel. 4 Distributed version control Server computer Version database Version 1 Version 2 Version 3 Computer A Version database Version 1 Version 2 Version 3 file Computer B Version database Version 1 Version 2 Version 3 file Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Acronyms VC = Version Control VCS = Version Control System CVCS = Centralized Version Control System DVCS = Distributed Version Control System Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Systems for version control Objektorienterade applikationer d2, förel. 4 Systems for version control CVS A centralized VCS. The “old standard”. Subversion (SVN), Perforce, Bazaar, … git A distributed VCS. Inventor: Linus Torvalds First intended for development of Linux. Resource efficient. Widespread! Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Traditional version control Objektorienterade applikationer d2, förel. 4 Traditional version control file C Version 1 file B file A Δ1 Version 2 Δ2 Version 3 Version 4 Δ3 Version 5 Revision history Changes Original files Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Git snapshots of a file system Objektorienterade applikationer d2, förel. 4 Git snapshots of a file system Revision history file C Version 1 file B file A C1 Version 2 B A1 C2 Version 3 Version 4 B1 A2 C3 Version 5 B2 Unchanged files are represented as links to earlier versions Snapshot of a directory Only changed files are stored again Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Version control concepts Objektorienterade applikationer d2, förel. 4 Version control concepts Repository (“repo”) A database of a project’s revision history. Commit (Checkin) Uploading a changed file to the repository. Checkout Downloading a version of a file from the repo. A note on syntax: A B earlier version later version Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Version control concepts Objektorienterade applikationer d2, förel. 4 Version control concepts Branch A parallel line of development in a project. Merge Creating a common line from two branches. Conflicts may occur! Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Git concepts Working directory Working directory A folder containing files Snapshot (revision) Staging area Intermediate storage of files in a snapshot. Repository A database of snapshots of a project history. Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Checkout, Stage and Commit Objektorienterade applikationer d2, förel. 4 Checkout, Stage and Commit Checkout Repository History Working directory Stage Commit Staged Snapshot Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Stage and Unstage Unstage Working directory Stage Staged Snapshot Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Workflow with local development branches Objektorienterade applikationer d2, förel. 4 Workflow with local development branches Repo Working directory Stage Commit Staged Snapshot History Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Branching feature A main branch V 1 V 2 V 3 V 4 V 5 V x V y topic branch feature B Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Merging two development branches Objektorienterade applikationer d2, förel. 4 Merging two development branches Version 6 contains both feature A and B V 1 V 2 V 3 V 4 V 5 V 6 V x V y Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Objektorienterade applikationer d2, förel. 4 Merge conflicts Snapshots V 5 and V y contain conflicting data V 1 V 2 V 3 V 4 V 5 *#@! V x V y Conflicts have to be resolved by the developer(s) Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Integrator-Manager Workflow Objektorienterade applikationer d2, förel. 4 Integrator-Manager Workflow The integrator pushes to a public repo. Each developer clones the public repo into a local copy and makes changes. Changes are pushed to an own public repo with write access. The integrator pulls in and merges contributions from the public repos. The integrator pushes merged changes to the “official” public repo. Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3

Integrator-Manager Workflow Objektorienterade applikationer d2, förel. 4 Integrator-Manager Workflow Main repo Public repo 1 Public repo 2 Public repo 3 2. Clone 1. Push 5. Push 3. Push 4. Pull in contributions Local repo Integration manager Developer 2: Main Local repo 2 B Developer 3: Feature B Local repo 3 Local repo 1 A Developer 1: Feature A Main Objektorienterade applikationer, DAT055, DAI2, 16/17, lp 3 DAT055, 16/17, lp 3