Source Code Management

Slides:



Advertisements
Similar presentations
Intro to Version Control Have you ever …? Had an application crash and lose ALL of your work Made changes to a file for the worse and wished you could.
Advertisements

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.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Microsoft Office 2013 ®® Appendix A Introduction to Cloud Computing.
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 Using Git 1Version control, using Git.
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.
Source Control Repositories for Team Collaboration: SVN, TFS, Git Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Introduction to Version Control
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 ?
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Warmup A programmer’s wife tells him, “Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.” The programmer.
Source Code Control CSE 3902 Matt Boggus. Source code control options for CSE 3902 Must use source code control that is integrated with Visual Studio.
Version control Using Git Version control, using Git1.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
(Sub)Version Control. 2 Keep large teams working on the same code Back up your work so you don't lose it all Compare changes to previous versions Revert.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
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.
1 MSTE Visual SourceSafe For more information, see:
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
SECTION 1: CODE REASONING + VERSION CONTROL slides borrowed and adapted from Alex Mariakis and CSE 390a Justin Bare & Deric Pang.
An Introduction to Git David Johndrow COMP 490 – Senior Design & Development 2/11/16.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Version Control Systems
Source Code Control For CSE 3902 By: Matt Boggus.
CS5220 Advanced Topics in Web Programming Version Control with Git
Information Systems and Network Engineering Laboratory II
Source Control Systems
11 Version control (part 2)
LECTURE 2: Software Configuration Management
Source Control Dr. Scott Schaefer.
Version Control overview
Version control, using Git
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control Systems
Storing, Sending, and Tracking Files Recitation 2
Concurrent Version Control
Version Control System
LECTURE 3: Software Configuration Management
Revision Control Daniel Daugherty
Subversion Basics Guide
Git CS Fall 2018.
Version Control System - Git
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Version Control with Git and GitHub
Systems Analysis and Design I
Hop Aboard the Git Train – Transitioning from TFVC
Git GitHub.
Using GitHub for Papyrus Models Jessie Jewitt – OAM Technology Consulting/ ARM Inc. January 29th, 2018.
Presentation transcript:

Source Code Management For CSE 3902 By: Matt Boggus

Overview Motivation and benefits of source code control Concepts underlying source code control implementations Options integrated into Visual Studio and usage tips

Basic premises of team project work Save previous versions of project (files) Source code Build instructions (.sln, .vsproj) Data / Art files Documentation Not Visual Studio user settings Provide a unique label or index for each previous version and be capable of getting each previous version on demand Track who made each edit Allow multiple users to view and modify the project simultaneously

Usually sub-optimal option Keep all project files on a one computer, allow multiple users to view the files Image from https://eduspiral.com/best-university-to-study-information-systems-security-in-malaysia/

Usually sub-optimal option Keep all project files on a USB drive, physically pass it around as needed Image from https://www.makeuseof.com/tag/ways-usb-stick-security-risk/

Usually sub-optimal option Everyone keeps their own copy of the project, and each time anyone changes a file they might: Email the new files to everyone Save the new files on a shared network drive (ex: BuckeyeBox) Image from https://www.recordnations.com/articles/using-cloud-storage-keep-upload-move/

Ultimately a process design decision Might be made by: Team Team leaders Boss(es) Consider the team and file formats when choosing how to manage project assets Might use version control for source code and shared drive for images and art assets Petabytes of data might be transferred faster using hard drives and the US postal service than over the internet Source code management does not eliminate the need to communicate with your teammates

File consistency Local copy Webserver copy

Practice question How would you implement a program that takes a string input then allows the user to change the string, but also revert it back to any of its previous states?

Storing results vs. storing file differences Figures for next few slides are from https://betterexplained.com/articles/a-visual-guide-to-version-control/

You local working copy is separate from versions stored elsewhere

Conflicts

Branching

Merging

Commit structure for one repository Figures from next few slides from http://web.cse.ohio-state.edu/~giles.25/3901/lectures/lecture02.pdf

Entire commit history is a directed, acyclic graph (DAG)

Centralized vs. Decentralized Two options integrated within Visual Studio Team Foundation Version Control (subversion or SVN based) Centralized ; one repository GIT Distributed ; every machine is a repository Image from http://www.slideshare.net/premaseem/git-presentation-10589300

Central Server Remote Server Clipart figure from files.channel9.msdn.com/thumbnail/d8ad47a0-5798-4e6d-9b8a-2d0843fa718c.pptx

Setup for source control in Visual Studio Team->Connect to… In Team Explorer, Select Team Projects… Click Servers… button, then Add… Copy-paste URL from the project creator, then click ok Should look something like this: https://TEAMORPROJECTOWNERNAME.visualstudio.com/ Select server to connect, signing in with the same account you set up for Visual Studio Online task planning

Working with TFVC In Visual Studio, connect to your team’s project First time setup Set local directory where you will store your copy of the project Map & Get Day-to-day use Under Team Explorer, click Source Control Explorer Right click on root folder->Get latest version After adding code and successfully rebuilding the solution, check in the changes

Working with GIT In Visual Studio, connect to your team’s project First time setup Clone repository on your local machine Day-to-day use Under Team Explorer, click Source Control Explorer Fetch commits Pull commits After adding code and successfully rebuilding the solution, push your commit The GUI options in Visual Studio for GIT are significantly less powerful than the command line options

Important practice After resolving a merge or conflict, get the latest version / fetch and pull the master branch, then make sure it still compiles and runs If you broke the build it is your responsibility to fix it

Source control and visual studio project files: An example of a common problem MarioCoder’s .proj file BlockCoder’s .proj file <Project xmlns="http://schemas.microsoft.com/develo per/msbuild/2003"> <ItemGroup> <Compile Include="helloworld.cs" /> </ItemGroup> <Target Name="Build"> <Csc Sources="@(Compile)"/> </Target> </Project> <Project xmlns="http://schemas.microsoft.com/develo per/msbuild/2003"> <ItemGroup> <Compile Include="helloworld.cs" /> </ItemGroup> <Target Name="Build"> <Csc Sources="@(Compile)"/> </Target> </Project>

How to avoid this problem Only allow 1 person to add new files to project / commit changes to project file Update before committing The shorter the time between getting code updates and committing new code, the less likely you will break the build Some version control supports locking files

References and additional learning resources Microsoft documentation on Git and VSTS https://docs.microsoft.com/en- us/vsts/git/overview?view=vsts#tfvc_or_git_summary 3901’s GIT lecture http://web.cse.ohio- state.edu/~giles.25/3901/lectures/lecture02.pdf https://betterexplained.com/articles/a-visual-guide-to-version- control/ files.channel9.msdn.com/thumbnail/d8ad47a0-5798-4e6d-9b8a- 2d0843fa718c.pptx https://home.usn.no/hansha/documents/software/software_development/topics/resources/TFS%20Overview.pdf mentions several other useful tools within VSTS, though the screenshots and content refer to the old name, Team Foundation Services (TFS)