CSC 2700: Scientific Computing

Similar documents
Git tutorial. Katie Osterried C2SM. October 22, 2015

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

Project Management. Overview

Revision Control and GIT

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

Github/Git Primer. Tyler Hague

GIT TUTORIAL. Creative Software Architectures for Collaborative Projects CS 130 Donald J. Patterson

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

Chapter 3. Revision Control

Version control CSE 403

Revision control systems (RCS) and. Subversion

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

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

Subversion Repository Layout

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

Common Configuration Management Tasks: How to Do Them with Subversion

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

An Introduction to Subversion

Distributed Version Control

February 2 nd Jean Parpaillon

Review Version Control Concepts

Version Control Systems (VCS)

Welcome! Virtual tutorial starts at 15:00 GMT. Please leave feedback afterwards at:

Version Control System - Git. zswu

Using Git to Manage Source RTL

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

Version control CSE 403

Version Control System. -- base on Subversion 1.4

Tizen/Artik IoT Practice Part 4 Open Source Development

COSC345 Software Engineering. Version Control

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

Version Control: Gitting Started

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Apache Subversion Tutorial

Version Control Systems (Part 1)

Revision Control. An Introduction Using Git 1/15

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

TDDC88 Lab 4 Software Configuration Management

Laboratorio di Programmazione. Prof. Marco Bertini

Version Control Systems: Overview

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies

Welcome! Virtual tutorial will start at 15:00 GMT. Please leave feedback afterwards at:

Introduction to Supercomputing

Version Control Systems

Version Control with GIT: an introduction

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

The Rock branching strategy is based on the Git Branching Model documented by Vincent Driessen.

Beyond git add/commit/push

Git for Subversion users

Version Control. So#ware Quality Quality Audit and Cer2fica2on. Master in Computer Engineering. Roberto García

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

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

Introduction to Git and Github

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

CS 390 Software Engineering Lecture 5 More Git

Git, the magical version control

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion

Tutorial 2 GitHub Tutorial

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

Introduction to Revision Control

Version control CSE 403

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

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

Version Control with Git


CSE 390 Lecture 9. Version control and Subversion (svn)

Git Introduction CS 400. February 11, 2018

VSO. Configuration Management

Version Control System GIT

Git. Presenter: Haotao (Eric) Lai Contact:

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Version Control with Git ME 461 Fall 2018

Software Project (Lecture 4): Git & Github

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

Software configuration management

Weak Consistency and Disconnected Operation in git. Raymond Cheng

b. Developing multiple versions of a software project in parallel

Tools for software development:

Use git rm to remove files from workspace

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

Technology Background Development environment, Skeleton and Libraries

The Old World. Have you ever had to collaborate on a project by

Visualizing Git Workflows. A visual guide to 539 workflows

Subversion Branching and Merging. Jan Skalický

Yinghui Wang

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Code Repository. P Blanchfield

Version control with Git.

Git for Version Control

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Week 5. CS 400 Programming III

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

A BASIC UNDERSTANDING OF VERSION CONTROL

CSE 391 Lecture 9. Version control with Git

Configuration Management

Using GitHub and SourceTree to work with DITA TC repositories

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

CS2720 Practical Software Development

Introduction, Instructions and Conventions

Revision control. INF5750/ Lecture 2 (Part I)

Transcription:

CSC 2700: Scientific Computing Record and share your work: revision control systems Dr Frank Löffler Center for Computation and Technology Louisiana State University, Baton Rouge, LA Feb 13 2014

Overview

Version control systems Version Control Systems: Most commonly stand-alone applications Also embedded into various other software, e.g. word processors spreadsheets content management systems wikis Changes: Might be identified by number or letter code Termed as revision number, revision level, or simply revision Associated with time-stamp, user and log message Can be compared, restored, and with some types of files, merged

Version control systems Traditionally: centralized model - solve conflicts with one of two methods: File locking grant write access to only one checkout at a time benefit: can provide some protection against difficult conflicts drawback: when locked for too long, developers are tempted to bypass system Version merging Simultaneous edit by multiple developers allowed Merge necessary when transferring change to central server Automatic merging available for simple files: text Often both options are available, but locking is typically not used (anymore).

Branches - Trunk - Tags Branch Duplication of a (larger) object under revision control Usually complete directory tree Trunk / Master Tag Main, central development branch Upstream branch Repository snapshots Used especially for releases Synonyms: labels, baselines Some repository systems treat all three identically.

Version control systems - Branches Branching: duplication of an object under revision control Modifications can happen in parallel along multiple branches. Branch: also known as trees, streams or code-lines Originating branch: parent branch or upstream Branch without parent: trunk or mainline Branches might be merged, especially into trunk Branches not intended to be merged usually called fork

Distributed revision control Peer-to-peer approach Theoretically no central repository Repositories synchronized by exchanging change-sets (patches) Communication only necessary for exchange with other copies Some common operations are fast, because local In practice, projects tend to have one designated central, official repository and only limited exchange between user copies.

Checkouts - Exports - Update - Commits Checkout (synonym: working copy) Act of creating a local working copy from the repository User may specify a specific revision or obtain the latest Export Act of obtaining only files from the repository Similar to checkout, but creates clean directory tree without version control metadata. Update Merges changes in the repository into the local working copy Might create conflicts with local changes that might have to be resolved manually Commit Action of writing or merging the changes made in the working copy back to the repository. Might not be possible without an up-to-date checkout Also: New revision that is created by committing

Some day on Geek & Poke http://geekandpoke.typepad.com/

Revision control - Log messages If you have nothing to say about what you are committing, you have nothing to commit. Log messages serve at least three important purposes To speed up the reviewing process. To help to write a good release note. To help the future maintainers to find out why a particular change was made (that might be you!) At least try to Summarize clearly in one line what this commit is about Describe the change, not how it was made Even better Write one-line summary, followed by an empty line and a longer description Line-break the commit message

Some day on Geek & Poke http://geekandpoke.typepad.com/

Revision control - example work-flows Simple change to central repository 1 Checkout 2 Change file locally 3 Test change 4 Update - shows no remote changes 5 Commit change

Revision control - example work-flows Change to central repository with conflicts 1 Checkout 2 Change file locally 3 Test change 4 Update shows changes and merge conflicts 5 Resolve conflict 6 Test change 7 Repeat updating until success 8 Commit change

Revision control - Conflicts Updating from repository will Try to merge remote changes with local changes Create a conflict if this fails Binary files: only option between theirs full and mine full Text files: fine-grained control of multiple changes in single file Example: $svn update U index.html G changed-b.html C rubbish-b.html Updated to revision 46. U - Updated G - Merged C - Conflict Test after conflict resolving!

Some day on Geek & Poke http://geekandpoke.typepad.com/

Some day on Geek & Poke http://geekandpoke.typepad.com/

Revision control - Conflicts Conflict markers in text files: <<<<<<< filename your changes ======= code merged from repository >>>>>>> revision Resolve conflict by Reviewing both changes and manually merging them Test merged version Tell RCS that conflict is resolved Commit

Some day on Geek & Poke http://geekandpoke.typepad.com/

Some day on Geek & Poke http://geekandpoke.typepad.com/

Revision control - example workflows Simple branch example 1 Create branch from trunk 2 Checkout branch 3 Change files locally, test and commit like on trunk 4 Possibly merge changes from trunk, resolve conflicts as usual 5 Eventually, merge changes from branch back into trunk 6 Remove branch

Revision control - example workflows Applying change using distributed RCSs 1 Checkout / Clone 2 Change file locally 3 Test change 4 Commit change (locally) 5 Update from other working copy (e.g. central repository) 6 Resolve possible conflicts, commit needed changes 7 Test again 8 Repeat until success 9 Push commit(s) to other working copy (e.g. central repository)

Revision control - history examination History in RCSs can be used to find out Why something was implemented (log messages) When something was implemented Who did a certain change Typical example: Test of checkout: ok Test of checkout after local changes: ok Test after update from repository: failure Narrow down location of bug by List log messages since last known working version Test without some of remote changes (go back in history) Tools can help with this process.

Some day on Geek & Poke http://geekandpoke.typepad.com/

Summary - Best RCS usage Basic Use it, learn (much) about it! Put as much as possible under version control Only put original source in version control, not built objects Test changes before committing Commit often and in logical chunks Update as often as possible (close open files beforehand!) Write meaningful commit messages Advanced Branch only when necessary Don t copy when you mean to branch Branch late Propagate / Merge early and often Reading: Subversion, Git, Mercurial

Course Work I Create public svn/git repository using free hosting service possibilities: bitbucket, github, google code,... Commit/push coursework text file there, Send email with link to us

Course Work II http://svn.cactuscode.org/flesh/trunk/src What was the commit message of revision 7? Show how you found out. Which revision removed the macro GROUP_SCALAR? (mentioned in the commit message) Do a checkout and an export of that repository. Report about the size of both. Which one is larger and why? Which version of svn are you using? https://github.com/lsuits/moodle How many forks does this project have on github? What is the (full) hash of the last commit, and the commit message? Show the diff of commit cc95aed777c75fe899992168fcd40031b45cb9b0