A BASIC UNDERSTANDING OF VERSION CONTROL

Similar documents
CS 390 Software Engineering Lecture 5 More Git

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

CS 390 Software Engineering Lecture 4 - Git

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

Introduction to Git and Github

Version Control. Version Control

Version Control. Version Control

Computer Science Design I Version Control with Git

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

CSE 391 Lecture 9. Version control with Git

Git. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

Version Control Systems

Git tutorial. Katie Osterried C2SM. October 22, 2015

Version control with Git.

Revision Control and GIT

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

Revision control. INF5750/ Lecture 2 (Part I)

Version Control: Gitting Started

Introduction to Version Control with Git

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

License. Introduction to Version Control with Git. Local Version Control Systems. Why Use Version Control?

Revision control Advanced git

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

Managing Network Configurations with Git and GitLab

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

Revision Control. An Introduction Using Git 1/15

Outline. Version Control System (VCS) basics Git terminology & concepts Basic Git commands Branches in Git Git over the network (time permitting)

Git for Version Control

Improving Your Life With Git

Software Revision Control for MASS. Git Installation / Configuration / Use

Tools for software development:

Version Control Systems (VCS)

Fundamentals of Git 1

Git. Presenter: Haotao (Eric) Lai Contact:

Using git to download and update BOUT++

Version Control System GIT

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

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

Introduction to Git. Database Systems DataLab, CS, NTHU Spring, 2018

Project Management. Overview

Lab Objective. Lab Assignment. Downloads and Installation

MOOSE-Based Application Development on GitLab

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

Use git rm to remove files from workspace

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

git the SCM system Jan-Simon Möller training.linuxfoundation.org

Version Control Systems

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

Git Introduction CS 400. February 11, 2018

I m an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus Torvalds, creator of Linux and Git

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Software Revision Control for MASS. Git Basics, Best Practices

FEEG Applied Programming 3 - Version Control and Git II

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

TDDC88 Lab 4 Software Configuration Management

CS 320 Introduction to Software Engineering Spring February 06, 2017

Version control system (VCS)

Version Control with GIT

Version Control System - Git. zswu

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

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:

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

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

Version Control. Ioannis N. Athanasiadis. with slides from Solution Perspective Media and Software Carpentry

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

Git & Github Fundamental by Rajesh Kumar.

How to version control like a pro: a roadmap to your reproducible & collaborative research

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

Part I Part 1 Version Control Systems (VCSs)

Git Magic: Versioning Files Like a Boss. Tommy MacWilliam

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

Part I Part 1 Version Control Systems (VCSs)

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

A Practical Introduction to Version Control Systems

Version Control Systems

CS 378: Autonomous Intelligent Robotics (FRI) Dr. Todd Hester

G E T T I N G S TA R T E D W I T H G I T

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

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

Introduction to Revision Control

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

Git, the magical version control

Recap: Developer's Environment

AIS Grid School 2015

Visualizing Git Workflows. A visual guide to 539 workflows

Part I Part 1 Version Control Systems (VCSs)

Version Control Systems

Version Control Systems

Git. A Distributed Version Control System. Carlos García Campos

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


Part I Part 1 Version Control Systems (VCSs)

Part I Part 1 Version Control Systems (VCSs)

What is Git? What is Git? Version Control. Barry Grant

Introduction to Version Control

Software Development I

Basic git. Interactive.

Git for Subversion users

Lecture 6 Remotes. Sign in on the attendance sheet!

Transcription:

A BASIC UNDERSTANDING OF VERSION CONTROL

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

DID YOU EVER DO THIS?

WHAT IS A VERSION CONTROL SYSTEM? CVCS VS DVCS

CVCS - CENTRALISED VERSION CONTROL SYSTEM There is ONE SERVER hosting all project s files Developers have to connect to the server in order to commit changes PRO: Developers no longer have to keep many copies of files on their computers as mentioned before, because the version control tool manages all the different versions of the same project. CON: If you lack of connectivity you can t work on the project. examples: SVN, CVS or Perforce

CVCS - CENTRALISED VERSION CONTROL SYSTEM Images taken from: Pro Git Book, Scott Chacon and Ben Straub - Licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0

DVCS - DISTRIBUTED VERSION CONTROL SYSTEM Every developer working on the project has HIS OWN COPY of all the files and versions from the beginning. Every developer has the FULL HISTORY of the project on their own computer You can still define a repository as central You can share some changes with another developer before pushing them to everyone examples: Git or Mercurial

DVCS - DISTRIBUTED VERSION CONTROL SYSTEM Images taken from: Pro Git Book, Scott Chacon and Ben Straub - Licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0

DVCS - DISTRIBUTED VERSION CONTROL SYSTEM Images taken from: https://github.com/git/git/blob/master/documentation/gitcvs-migration.txt

WHAT IS A VERSION CONTROL SYSTEM? TERMINOLOGY

TERMINOLOGY BRANCH: When a set of files is duplicated and can be modified independently from the origin. TRUNK / MAINLINE / MASTER: Represents the main line of development. WORKING COPY: The local copy of files of a repository. Is the copy on which you are working on.

TERMINOLOGY CLONE: Creating a new repository copying all files and revisions from another repository. PULL / FETCH: Downloading revisions from a repository to your own repository, usually done before pushing in order to check if other developers made some changes. PUSH: Uploading your changes to a repository.

TERMINOLOGY MERGE: is a fundamental operation that reconciles some changes made to a set of files, for example when two people on two different computers modified the same set of file at the same time. COMMIT: Called also CHECK IN, means that a set of files modified on your working copy is merged into your own repository. CONFLICT: When different parties make some changes to the same set of files, sometimes the the system is unable to reconcile the changes.

WHAT IS A VERSION CONTROL SYSTEM? GIT

MEANING Taken from: https://github.com/git/git/blob/master/readme.md

DOWNLOADS https://git-scm.com/downloads Images taken from: https://git-scm.com

THE THREE STATES Images taken from: Pro Git Book, Scott Chacon and Ben Straub - Licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0

GENERAL SETUP $ git -version $ git config -global user.name Edoardo Degli Innocenti $ git config -global user.email degliinn@dei.unipd.it $ git config -list $ git help <verb> $ git <verb> --help

LOCAL PROJECT - SETUP If you have a local project to track $ git init $ git status You can add files to the STAGING AREA with the command $ git add <file name> You can add ALL files to the STAGING AREA with the command $ git add -A

LOCAL PROJECT - COMMIT When you make a commit, remember to write a detailed message about what you are committing. $ git commit -m My first commit To see a list of commits $ git log

REMOTE REPOSITORY - SETUP If you have a remote project to track $ git clone <url> <path where to clone> All previous command seen before work correctly. $ git status $ git add -A $ git commit -m Message about the commit To see informations about changes in a set of files $ git diff

REMOTE REPOSITORY - PULL / PUSH In order to see informations about all branches in a repository $ git branch -a If you want to upload your commits, before remember to do a PULL request $ git pull origin master $ git push origin master To create a new branch to work on $ git branch <branch name> To switch to a different branch $ git checkout <branch name>

REMOTE REPOSITORY - MERGE In order to merge the files modified in a different branch to the master one $ git checkout <master branch name> $ git pull <master branch name> $ git merge <branch to merge name> $ git push <master branch name> If you want to delete (locally and remotely) the merged branch $ git branch -d <branch name to delete> $ git push origin -delete <branch name to delete>

REMOTE REPOSITORY - UNDOING THINGS If you have just done a commit and you forgot to add some files $ git commit -m initial commit $ git add <forgotten file name> $ git commit --amend If you want to revert your file back to the last committed version $ git checkout - <file name to revert>

EXERCISE Create a folder in order to store your working copy and go there with the terminal $ git clone https://labesp16@bitbucket.org/ labesp16/labesp16.git $ cd labesp16 $ git status $ git log

EXERCISE Go to the repository folder and add a list of your choice $ git status $ git add -A $ git commit -m <describe your list> $ git pull origin master $ git push origin master PASSWORD: lab-esp16

EXERCISE Create a new branch $ git branch <new branch name> $ git checkout <new branch name> $ git status $ git log Push some files, and invite others to modify your files. Try to manage some conflicts.

MORE INFOS Read the book about Git at https://git-scm.com/book/en/v2