Version Control. Version Control



Similar documents
Git Basics. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 22

Using Git for Project Management with µvision

Introduction to Version Control

Version Control! Scenarios, Working with Git!

Version Control with Git. Linux Users Group UT Arlington. Rohit Rawat

Version Control with Git

MOOSE-Based Application Development on GitLab

MATLAB & Git Versioning: The Very Basics

Annoyances with our current source control Can it get more comfortable? Git Appendix. Git vs Subversion. Andrey Kotlarski 13.XII.

FEEG Applied Programming 3 - Version Control and Git II

Version control with GIT

Software Configuration Management and Continuous Integration

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Git - Working with Remote Repositories

Introduction to the Git Version Control System

Version Control with Git. Kate Hedstrom ARSC, UAF

Version Control with Git

Version Control with Git. Dylan Nugent

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

Introduction to Version Control with Git

Lab Exercise Part II: Git: A distributed version control system

How to Create a Free Private GitHub Repository Educational Account

Beginning with SubclipseSVN

Introducing Xcode Source Control

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Introduc)on to Version Control with Git. Pradeep Sivakumar, PhD Sr. Computa5onal Specialist Research Compu5ng, NUIT

Source Control Systems

CSE 374 Programming Concepts & Tools. Laura Campbell (Thanks to Hal Perkins) Winter 2014 Lecture 16 Version control and svn

Git Tutorial - How to Create a Full Project

Data management on HPC platforms

Introduction to Version Control with Git

Version Control with. Ben Morgan

Using Microsoft Expression Web to Upload Your Site

Content. Development Tools 2(63)

Distributed Version Control with Mercurial and git

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

PKI, Git and SVN. Adam Young. Presented by. Senior Software Engineer, Red Hat. License Licensed under

An Introduction to Mercurial Version Control Software

Version Control for Computational Economists: An Introduction

Version Uncontrolled! : How to Manage Your Version Control

How to set up SQL Source Control. The short guide for evaluators

Two Best Practices for Scientific Computing

Version Control with Subversion and Xcode

Git. A Distributed Version Control System. Carlos García Campos carlosgc@gsyc.es

DAVE Usage with SVN. Presentation and Tutorial v 2.0. May, 2014

Work. MATLAB Source Control Using Git

Version Control Tutorial using TortoiseSVN and. TortoiseGit

ELF WP 2 UML repository instruction

Unity Version Control

Continuous Integration and Delivery at NSIDC

Version Control using Git and Github. Joseph Rivera

CISC 275: Introduction to Software Engineering. Lab 5: Introduction to Revision Control with. Charlie Greenbacker University of Delaware Fall 2011

Software Delivery Integration and Source Code Management. for Suppliers

Version Control Using Subversion. Version Control Using Subversion 1 / 27

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Dalhousie University CSCI 2132 Software Development Winter 2015 Lab 7, March 11

CS 2112 Lab: Version Control

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

Software configuration management

CS108, Stanford Handout #33. CVS in Eclipse

Version Control Systems

Git, GitHub & Web Hosting Workshop

Continuous Integration. CSC 440: Software Engineering Slide #1

Pragmatic Version Control

Working Copy 1.4 users manual

Version Control with Subversion

Mobile Development with Git, Gerrit & Jenkins

Using Subversion in Computer Science

Git Basics. Christian Hanser. Institute for Applied Information Processing and Communications Graz University of Technology. 6.

Version Control Systems: SVN and GIT. How do VCS support SW development teams?

INF 111 / CSE 121. Homework 4: Subversion Due Tuesday, July 14, 2009

Version Control Tools

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer GIT

AVOIDING THE GIT OF DESPAIR

An Introduction to Git Version Control for SAS Programmers

A Git Development Environment

OS X Modular Imaging and Deployment using Free and Open Source Tools

Revision control systems (RCS) and

pure::variants Transformer for Software Configuration Management Manual

Source Control Guide: Git

Derived from Chris Cannam's original at, an.

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger

BlueJ Teamwork Tutorial

Miguel A. Figueroa Villanueva Xabriel J. Collazo Mojica. ICOM 5047 Capstone Miguel A. Figueroa Villanueva University of Puerto Rico Mayagüez Campus

Ingeniørh. Version Control also known as Configuration Management

Developer Workshop Marc Dumontier McMaster/OSCAR-EMR

PxPlus Version Control System Using TortoiseSVN. Jane Raymond

Distributed Version Control

Using GitHub for Rally Apps (Mac Version)

In depth study - Dev teams tooling

Transcription:

Version Control CS440 Introduction to Software Engineering 2013, 2015 John Bell Based on slides prepared by Jason Leigh for CS 340 University of Illinois at Chicago Version Control Incredibly important when working in teams. Many tools for this: Revision Control System (RCS), Subversion (SVN), CVS, GIT etc. Ref: http://en.wikipedia.org/wiki/comparison_of_ revision_control_software Pro Git online book: http://progit.org/book/ All CS 440 project teams will use git from a CS server: marvin.cs.uic.edu 1

How Previous Version Control Systems Worked E.g. SVN, Perforce, CVS Create a central repository for holding your code. Upload initial codes to repository. Checkout codes you want to modify. Edit codes. Commit edits to the repository. How Git Works Git is taking the version control world by storm. Git is a distributed system. When you work on code, you CLONE remote repository. When you commit your changes you do not need to be networked to the repository server. You can push your updates later. Git has the notion of staging areas that are used to mark files that will get committed. This is really just the list of files that are monitored by git as part of a project. If you modify a file but do not stage it, it will not get committed. I.e. not all files in working directory are in git Git makes it very easy to create and switch code branches so you experiment with code ideas without damaging the main branch. 2

( control list ). Create / edit files git add git init create local project OR git clone create local copy Remote repository git commit git push copy back to origin Setup Git on Your Computer Go to: http://git-scm.com/ Download GIT for your platform. ( Right-click on directory and select git bash ) In Terminal Window: git config --global user.name John Bell git config --global user.email jbell@uic.edu 3

Grab the Initial Git Repository Right click on parent directory where you want to work Select git bash to open a bash shell In Terminal Window: git clone groupname@marvin.cs.uic.edu:~/code.git It will ask for a password- use the one provided. Repeat for Develop.git ( or other repositories provided. ) This procedure will create two subdirectories under the initial parent Code and Develop and configure them for use with git. If the remote repositories are not empty, it will populate the directories with files from the repositories. ( I.e. It will set up working directories. ) NOTE: this is assuming you are using a remote repository. If instead you just want to create a git repository for yourself on your own computer, then you do: git init Add A New File Create the file you wish to add, e.g. overloading.cpp In Command Line Window: Let Git know: git add overloading.cpp Commit the file: git commit git will ask you for a comment. Use vi style editing commands Push this file to the repository: git push origin master Origin refers to the remote repository Master refers to the master branch of your source code 4

Merging When multiple people have cloned a repository, made edits and now want to push their edits, git push will fail. You will need to: git fetch to get the new changes git merge origin/master then merge the two to form a wholly new master. Then finally: git push origin master See: http://progit.org/book/ch5-2.html Branching Lets say you want to experiment with a code idea and so you want to spin off a separate branch from the Master branch. You can use: git branch mynewbranch create the new branch git checkout mynewbranch switch to the branch From now on all mods to your code occur in the new branch. If you want to switch back to Master branch: git checkout master Now lets say you want to merge your codes with the changes your partner has made: git checkout master switch back to master branch git fetch fetch the remote mods git merge master merge with your master git merge mynewbranch if desired merge with mods in your special branch 5

Git In Depth Pro Git online book: HIGHLY RECOMMENDED http://progit.org/book/ Git Cheat Sheet git config set up git init do this if you plan to create your own local repository git clone from repository do this to bring in a remote repository git add files add files to staging area to mark for commit git commit commit the file git push origin master push the committed files to remote origin s master branch Second person does git clone as well makes his changes tries to do push but fails must do a git fetch fetches latest updates from repository git merge merges the versions git push origin master pushes it back to the server 6