G51FSE Version Control Naisan Benatar. Lecture 5 - Version Control 2 On today’s menu... The problems with lots of code and lots of people Version control.

Slides:



Advertisements
Similar presentations
Week 2 DUE This Week: Safety Form and Model Release DUE Next Week: Project Timelines and Website Notebooks Lab Access SharePoint Usage Subversion Software.
Advertisements

Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Version Control System (Sub)Version Control (SVN).
Version Control 1.  Version control (or revision control) is the term for the management of source files, and all of the intermediate stages as development.
Software Configuration Management Donna Albino LIS489, December 3, 2014.
Juan Carlos Flores 10/20/2011. Outline Introduction Centralized Revision Control Systems Subversion Overview Distributed Revision Control Systems Network.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Development and Deployment Information Systems 337 Prof. Harry Plantinga.
CS 501 : An Introduction to SCM & GForge An Introduction to SCM & GForge Lin Guo
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Version Control. What is Version Control? Manages file sharing for Concurrent Development Keeps track of changes with Version Control SubVersion (SVN)
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
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Chapter - 2 What is “GIT” VERSION CONTROL AND GIT BASICS.
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.
Introduction to Version Control
Why you should be using Version Control. Matt Krass Electrical/Software Engineer November 22, 2014.
Source Control Repositories for Team Collaboration: SVN, TFS, Git.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
1 Lecture 19 Configuration Management Software Engineering.
1 Software Development Configuration management. \ 2 Software Configuration  Items that comprise all information produced as part of the software development.
Git – versioning and managing your software L. Grewe.
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.
Source Control Primer Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
Lokesh Puppala. Introduction  Git - Distributed version control system  Initiated by Linus Torvalds  Strongly influenced by Linux kernel development.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Version Control.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
Week 3 January 22, 2004 Adrienne Noble. Today CVS – a great tool to use with your groups Threads – basic thread operations Intro to synchronization Hand.
Version Control System Lisa Palathingal 03/04/2015.
Sabriansyah R.A Version Control. The Repository Subversion adalah sistem tersentralisasi untuk informasi sharing Repository adalah pusat penyimpanan data.
Version Control and SVN ECE 297. Why Do We Need Version Control?
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
CS5220 Advanced Topics in Web Programming Version Control with Git
Information Systems and Network Engineering Laboratory II
Git & Github Timothy McRoy.
Git and GitHub primer.
Version Control with Subversion
LECTURE 2: Software Configuration Management
Version control, using Git
Version Control System using Git
Development and Deployment
Version Control with Git and GitHub
An introduction to version control systems with Git
Distributed Version Control with git
Version Control with git
LECTURE 3: Software Configuration Management
Revision Control Daniel Daugherty
Git CS Fall 2018.
Version Control System - Git
Git started with git: 2018 edition
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Presentation transcript:

G51FSE Version Control Naisan Benatar

Lecture 5 - Version Control 2 On today’s menu... The problems with lots of code and lots of people Version control systems what are they? how are they used? centralised versus distributed version control Features of version control including branching A short demo of git

Lecture 5 - Version Control Dealing with Change How do you manage your coursework? Modifying existing code (using Q1 for a basis for Q2) Backing up working code Checking if an idea works (Do I use a Hashtable or a HashMap?) Shaing code in group projects 3

Lecture 5 - Version Control (Bad) Solutions Copying (Coursework_working.java, Coursework_tmp.java) Copy & Paste code snippets Copy entire directories ing code to people 4

Lecture 5 - Version Control 5 Open Source You thought coursework was bad? Linux kernel has thousands of regular developers, millions of files. Developers spread over the globe across multiple time zones

Lecture 5 - Version Control 6 Big code bases Operating systems code Win 95 approx 5 million lines of code (1995) Linux kernel million lines of code (2011) Modern PC game Unreal 3 approx 500,000 lines of code

Lecture 5 - Version Control 7 Making a mess The Linux kernel runs on different processors (ARM, x86, MIPS). These can require significant differences in low level parts of the code base Many different modules Old versions are required for legacy systems Because it is open source, any one can download and suggest changes. How can we create a single kernel from all of this?

Lecture 5 - Version Control Not just code! A Code Base does not just mean code! Also includes: Documentation Build Tools (Makefiles etc) Configuration files But NOT a certain type of file 8

Lecture 5 - Version Control 9

10 Control the process automatically Manage these things using a version control system (VCS) A version control system is a system which allows for the management of a code base.

Lecture 5 - Version Control 11 Details of the process Files are kept in a repository Repositories can be local or remote to the user The user edits a copy called the working copy Changes are committed to the repository when the user is finished making changes Other people can then access the repository to get the new code Can also be used to manage files when working across multiple computers

Lecture 5 - Version Control 12

Lecture 5 - Version Control Centralised Version Control A single server holds the code base Clients access the server by means of check- in/check-outs Examples include CVS, Subversion, Visual Source Safe. Advantages: Easier to maintain a single server. Disadvantages: Single point of failure. 13

Lecture 5 - Version Control 14

Lecture 5 - Version Control Distributed Version Control Each client (essentially) holds a complete copy of the code base. Code is shared between clients by push/pulls Advantages: Many operations cheaper. No single point of failure Disadvantages: A bit more complicated! 15

Lecture 5 - Version Control 16

Lecture 5 - Version Control 17 More Uses of Version Control Version control is not just useful for collaborative working, essential for quality source code development Often want to undo changes to a file start work, realize it's the wrong approach, want to get back to starting point like "undo" in an editor… keep the whole history of every file and a changelog Also want to be able to see who changed what, when The best way to find out how something works is often to ask the person who wrote it

Lecture 5 - Version Control Branching Branches allows multiple copies of the code base within a single repository. Different customers have different requirements Customer A wants features A,B, C Customer B wants features A & C but not B because his computer is old and it slows down too much. Customer C wants only feature A due to costs Each customer has their own branch. Different versions can easily be maintained 18

Lecture 5 - Version Control Selecting a VCS When choosing a VCS consider: How many files and developers are likely to be involved in the project? Speed for common operations (check-in, check-out) Is there a server? Does it need to be powerful? 19

Lecture 5 - Version Control 20 Essential features Check-in and check-out of items to repository Creation of baselines (labels/tags) Version 1.0 released! Control and manipulation of branching management of multiple versions Overview of version history

Lecture 5 - Version Control Additional Features (1) Change Management: Professional software will have bugs. Customers will find them. How do we know if a bug has been fixed? Check-outs of code usually controlled. A bug report will identify where the bug is in the code. The fixed code (patch) is checked in and linked to bug report Hence we can see exactly what changes were made in response to a specific bug. Good for accountability 21

Lecture 5 - Version Control Additional Features (2) Code responsibility & Code audits. You stole my code! Who is responsible for this module? Legal stuff Forking – Common with Open source software A subset of developers fork off a parent project to produce a second copy of the project. Reasons vary but often done to make a more specific version. Metrics (Managers only!) 22

Lecture 5 - Version Control Check Outs If you want to make a change the file needs to be checked out from the repository Usually done a file at a time. Some VCSs will lock checked out files so only one person may edit at a time. 23

Lecture 5 - Version Control Check-In When changes are completed the new code is checked-in. A commit consists of a set of checked in files and the diff between the new and parent versions of each file. Each check-in is accompanied by a user name and other meta data. Check-ins can be exported from the Version Control system the form of a patch. 24

Lecture 5 - Version Control Merging There are occasions when multiple versions of a file need to be collapsed into a single version. E.g. A feature from one branch is required in another This process is known as a merge. Difficult and dangerous to do in CVS Easy and cheap to do it git 25

Lecture 5 - Version Control 26

Lecture 5 - Version Control Version Control in action I use git for my day to day work. One developer, lots of code written over 3 years in multiple languages (C, Python, Java, shell, awk) I need a regular back-up system but work on at least 3 PCs (Home, work and work linux). 27

Lecture 5 - Version Control Using a git repository $ git init $ git add $ git commit –a $ git branch $ git checkout $ git push $ git pull 28

Lecture 5 - Version Control Any Questions? 29

Lecture 5 - Version Control Questions for you What is the difference between pull and a check out? Who originally wrote git and why? What process should be done before each check-in? What types of file should NOT be included in source control? 30

Lecture 5 - Version Control 31 Homework for monday Find out how Sourceforge is currently using version control to manage open source projects Git & CVS are installed on our linux systems log in and have a look read the man page if you get stuck

Lecture 5 - Version Control 32 Next time A new guest lecturer Dr Bob Oates Will be covering Debugging. How to find the bugs without a single printf()!