Version Control Systems

Similar documents
[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

Common Configuration Management Tasks: How to Do Them with Subversion

Department of Computer Science College of Engineering Boise State University

Version Control with GIT: an introduction

Version Control. Kyungbaek Kim. Chonnam National University School of Electronics and Computer Engineering. Original slides from James Brucker

Ingegneria del Software Corso di Laurea in Informatica per il Management (D)VCS. Davide Rossi Dipartimento di Informatica Università di Bologna

Revision control. INF5750/ Lecture 2 (Part I)

A BASIC UNDERSTANDING OF VERSION CONTROL

Source control with Subversion A user perspective

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Computer Science Design I Version Control with Git

Push up your code next generation version control with (E)Git

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Version Control Systems (VCS)

Using Subversion with LeMANS and MONACO

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

Weak Consistency and Disconnected Operation in git. Raymond Cheng

Revision Control. An Introduction Using Git 1/15

February 2 nd Jean Parpaillon

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Prof. Dr. Marko Boger. Prof. Dr. Christian Johner. Version Management

Software Tools Subversion

A Short Introduction to Subversion

Tools for software development:

Version Control. CSC207 Fall 2014

CVS Application. William Jiang

Subversion. CS 490MT/5555, Fall 2015, Yongjie Zheng

Subversion. An open source version control system. W. Miah escience Rutherford Appleton Laboratory

Project Management. Overview

Version control CSE 403

Subversion Repository Layout

Manage quality processes with Bugzilla

Introduction to Revision Control

Version Control System GIT

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

Revision Control II. - svn

Configuration Management

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

Subversion FOUR. 4.1 What is Version Control? 4.2 What is Subversion? Types of Version Control SESSION

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

An Introduction to Subversion

TDDC88 Lab 4 Software Configuration Management

2/8/18. Overview. Project Management. The First Law. What is Project Management? What Are These Changes? Software Configuration Management (SCM)

Version control with Git.

Apache Subversion (SVN)

A Practical Introduction to Version Control Systems

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Chapter 3. Revision Control

INET

Software Development I

CSC 2700: Scientific Computing

Source Control. Comp-206 : Introduction to Software Systems Lecture 21. Alexandre Denault Computer Science McGill University Fall 2006

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

Apache Subversion (SVN)

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command:

VSO. Configuration Management

Con$nuous Integra$on Development Environment. Kovács Gábor

Version Control with GIT

CSE 391 Lecture 9. Version control with Git

Version Control System - Git. zswu

Portions adapted from A Visual Guide to Version Control. Introduction to CVS

Using CVS to Manage Source RTL

Source Code Management

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

CS 390 Software Engineering Lecture 5 More Git

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn

SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE

Git, the magical version control

FAQ Q: Where/in which branch do I create new code/modify existing code? A: Q: How do I commit new changes? A:

b. Developing multiple versions of a software project in parallel

Version Control Systems (Part 1)

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

Version control CSE 403

Version Control Systems: Overview

CSE 331 Software Design & Implementation

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system

CS2720 Practical Software Development

CS 320 Introduction to Software Engineering Spring February 06, 2017

Revision Control and GIT

Version control CSE 403

Version Control. Version Control

Submitting your Work using GIT

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

Part I Part 1 Version Control Systems (VCSs)

Computer Labs: Version Control with Subversion

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU)

Subversion. Network Monitoring & Management

2 Initialize a git repository on your machine, add a README file, commit and push

About CVS. 1 Version Control - what is it? why is it useful?

A Journey in So,ware Development An overview of methods and tools (part 3)

Version Control with Git

Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

Using git to download and update BOUT++

Version Control Systems

Transcription:

Nothing to see here. Everything is under control! September 16, 2015

Change tracking File moving Teamwork Undo! Undo! UNDO!!! What strategies do you use for tracking changes to files?

Change tracking File moving Teamwork Beam me up! How do you transfer your electronic work between computers?

Change tracking File moving Teamwork Beam me up! How do you transfer your electronic work between computers?

Change tracking File moving Teamwork Many hands make light work When coding in groups, have you had problems with Exchanging files? Coordinating changes? Tracking progress?

In pictures Comparison Files kept in an electronic library known as a repository. The repository is the master copy. It should not be changed directly! A copy of the library can be checked out. Changes can be made to these local copies resulting in a new. These changes can then be committed to the repository.

In pictures Comparison All changes are recorded. No changes are permanent since older revisions can be retrieved. Log messages can and should be included with every commit. In this course, we will be using the (svn) revision control system.

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 Local copies are created by checking out the repository. Any previously committed revision of a file can be checked out. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 Local changes (file changes, additions, and deletions) are not seen by the repository or other local copies. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 If more than one local copy is modified, they may share (locally) the same revision number, but are still independent. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 Changes to a local copy may be committed to the repository. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 Local copy 1 s is not the same as in the repository or local copy 3. Local copies 1, 2, and n are out-of-date with respect to the repository. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 Local copies may be synchronised with the repository via an update command. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 Local copy 1 cannot commit because it has outdated versions of files. It must be updated before its changes can be committed. Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3 The update may result in a coherent new local copy or... Local copy n

In pictures Comparison Local copy 1 Repository Local copy 2 Local copy 3... there may be that need to be resolved before changes are committed back to the repository. Local copy n

In pictures Comparison Local copy 1 r215 Repository r215 Local copy 2 Local copy 3 Once any conflicts are resolved, changes can be committed back to the repository. Local copy n

In pictures Comparison Local copy 1 r215 Repository r215 Local copy 2 Local copy 3 The repository stores all previously committed revisions; one can update to any of these revisions. r201 Local copy n

In pictures Comparison Comparison of version control systems Design choice Distribution model: Client-server vs. distributed Concurrency: Merging vs. locking Versioning: Per-file vs. per-commit Revision IDs: Namespace vs. hashes vs. pseudorandom vs. timestamp Differences In a client-server model, there is a master that clients usually need to access in order to commit. In a distributed system, everyone has a master copy of the repository. Locking prevents multiple people from writing to the same file(s) whereas merging combines concurrent changes sometimes manually, if necessary. Per-file versioning increments a file s version when changed; in per-commit versioning, all files at a given point in time have the same version number. Namespace revision IDs label versions sequentially (e.g. 1, 2, 3). Content hashes give IDs based on the contents of a revision. Pseudorandom IDs carry no meaning. Timestamp IDs are based on when a changeset is committed. CVS git

URLs Common commands URLs A uniform resource locator (URL) is a type of address that points to a resource and indicates a retrieval mechanism. uses URLs to point to repositories and items in repositories. http:// www.cdf.utoronto.ca/~csc207h Retrieval Mechanism Resource location Even though HTTP is sometimes used as a retrieval mechanism, you should generally not use a web browser to access a repository.

URLs Common commands URLs can retrieve files via a file system (file://), HTTP and HTTPS (http:// and https://), the svn protocol (svn://), or the svn protocol through ssh (svn+ssh://).

URLs Common commands Pull revisions from the repository svn checkout URL Check out a repository from the given URL. co can be used in place of checkout to save typing. svn update [file 1... file n ] Brings local files in sync with the repository. Conflicts requiring are flagged. up can be used in place of update to save typing. svn revert [file 1... file n ] Revert files the state they were in after the last update.

URLs Common commands Make new changes to the local copy svn remove file 1... file n Removes files from local copy. rm can be used in place of remove to save typing. A commit is still required to remove the file from the repository. N.B. Older revisions are unaffected. svn move fromfile tofile Renames or moves a file in the local copy. mv can be used in place of move to save typing. A commit is still required to make the changes available in the repository. svn add file 1... file n Adds the given files to the local copy s list of managed files. A commit is still required to make the files available in the repository.

URLs Common commands Make changes to the repository svn commit [file 1... file n ] [-m "Log message "] Pushes local changes to the repository. Only allowed if local copy is up-to-date. ci can be used in place of commit to save typing.

URLs Common commands Commands that provide information svn status [file 1... file n ] Shows the status of files in the local copy with respect to the repository. svn diff [-r revision ] [file 1... file n ] Lists differences in files compared to the current version of files in the repository or a specific revision, if specified. svn log [file 1... file n ] Shows the history of commits including the committer, time, and commit message for each commit. svn [-r revision ] [file 1... file n ] Annotates each line of a file with the last person to change it line and the revision in which the change was made. svn help [command ] Get on-line help for.

URLs Common commands Other useful commands When working in teams, the following may be useful: merge lock unlock resolved copy We will cover some of these later in the course.

File organization Checking in CSC207 Typical repository organization / The root of the repository trunk/ src/ docs/ branches/ tag/ Source code Documentation Side development Important releases

File organization Checking in CSC207 To check in or not to check in? Do check in Your own test programs, Unit tests/expected output, Design documents, Readme files, notes, etc. Avoid checking in files (e.g., Python pyc and Java class files); they waste disk space and bandwidth, Computer-specific configuration files, Temporary files, Broken code (this is called breaking the build ), and Dead/commented-out code.

File organization Checking in CSC207 When to check in After After When you need to move files to another location. Revisions that do not run should not be checked into the trunk of a repository.

File organization Checking in CSC207 Checking in for CSC207 You will each be given access to a repository for submitting homework. Checking in is generally very fast. The first time may take longer. Check in early! Check in often! It is easier to track and fix problems if check-ins are made after small changes. Expect to lose all arguments about submission problems if your first check-in was on the due-date or the day before.

File organization Checking in CSC207 Course notes Code examples and other text documents will be made available through a read-only repository: svn://cdf.toronto.edu:5115/l5101 You may wish to check out the repository as soon as possible.