Using Git For Development. Shantanu Pavgi, UAB IT Research Computing

Similar documents
Revision Control. An Introduction Using Git 1/15

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

Index. Alias syntax, 31 Author and commit attributes, 334

Introduction to Version Control

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

Version Control: Gitting Started

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

Introduction to GIT. Jordi Blasco 14 Oct 2011

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

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

Git for Newbies. ComMouse Dongyue Studio

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011)

Using git to download and update BOUT++

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

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

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

E, F. deleteall command, 352 directory structure, 350 export_data method, 353 inline_data method, 353 print_export method, 351 target directory, 351

CS 390 Software Engineering Lecture 5 More Git

Version Control with GIT: an introduction

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

Git for Version Control

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

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


Git for Subversion users

Fundamentals of Git 1

Introduction to distributed version control with git

INET

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

Git. Ľubomír Prda. IT4Innovations.

GIT for companies Mark Struberg, INSO TU Vienna

Version control with Git.

How to be a git. Dominic Mitchell

February 2 nd Jean Parpaillon

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

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

Git. Christoph Matthies Software Engineering II WS 2018/19. Enterprise Platform and Integration Concepts group

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:

Version Control Systems

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

CS 390 Software Engineering Lecture 3 Configuration Management

AIS Grid School 2015

Introduction, Instructions and Conventions

M E R C U R I A L (The Source Control Management)

Revision control Advanced git

CSC 2700: Scientific Computing

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

Version Control with Git

Laboratorio di Programmazione. Prof. Marco Bertini

CSE 391 Lecture 9. Version control with Git

August 22, New Views on your History with git replace. Christian Couder

Review Version Control Concepts

Git: Distributed Version Control

GIT VERSION CONTROL TUTORIAL. William Wu 2014 October 7

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Software Development I

Source Code Management wih git

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

Git: Distributed Version Control

2 Initialize a git repository on your machine, add a README file, commit and push

Using Git to Manage Source RTL

A Practical Introduction to Version Control Systems

Mike McQuaid INCLUDES 66 TECHNIQUES. Foreword by Scott Chacon MANNING

Distributed Version Control

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

Introduction to Git and Github

Software Project (Lecture 4): Git & Github

git-flow Documentation

Contribute To Linux Mainline

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

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

Git and Gerrit Workflows. Enforcing Manual & Automated Review

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

Algorithm Engineering

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari

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

Version control CSE 403

CS 320 Introduction to Software Engineering Spring February 06, 2017

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

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

FEEG Applied Programming 3 - Version Control and Git II

Distributed Version Control (with Git)

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

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

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Git Branching. Chapter What a Branch Is

Git, The Developers Perspec ve

Version Control Systems: Overview

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

Version Control with Git ME 461 Fall 2018

Advanced Git. Luc Sarzyniec. Xilopix, February / 88

Version control CSE 403

Version Control System - Git. zswu

b. Developing multiple versions of a software project in parallel

Version control system (VCS)

Version Control with Git

Subversion Repository Layout

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

Git Like You Mean it. Alan Ott SCaLE 16x March 8-11, 2018

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

Transcription:

Using Git For Development Shantanu Pavgi, pavgi@uab.edu UAB IT Research Computing

Outline Version control system Git Branching and Merging Workflows Advantages

Version Control System (VCS) Recording changes to files and maintaing associated metadata Copy or tar command with timestamps Types Centralized Distributed

Centralized vs Distributed VCS Reference: http://progit.org/book/ch1-1.html

Git Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Tool for maintaining your work history Used by: Linux Kernel Android Ruby on Rails Reference: http://git-scm.org

Advantages Works off-line Fast Easy or cheap branching Public and private work histories Rewrite or curate history before making it public Repositories can talk to each other Flexibility in workflows

Commits Tracks content and not files working directory staging area git repository Allows you to stage changes add Each commit is a complete snapshot of all staged files Unique 40 character hash for each commit checkout commit Local operations

Commits Snapshot Committer s name and email address Parent commits Commit message

Branching Branch: Line of development master branch is the default Create branches to have isolated lines of development A 'head' is a named reference to a commit object - e.g. branches and tags. A repository can contain any number of heads, however it points to only one 'head' at a time. This 'current head' is called HEAD.

Branching Branch: Line of development master branch is the default Create branches to have isolated lines of development A 'head' is a named reference to a commit object - e.g. branches and tags. A repository can contain any number of heads, however it points to only one 'head' at a time. This 'current head' is called HEAD.

Branching HEAD *master f32dc5 abc123 9ff2b8 2bc3d4 e26a2f (root) 7f3bcd 123abc ticket-4 time

Merging HEAD f32dc5 abc123 *master 9ff2b8 2bc3d4 e26a2f def234 (root) 7f3bcd 123abc ticket-4 time

Branching and Merging Allows switching contexts Diverge from main line of development or stable code in a clean manner Separate space for experimentation and bug fixes Local - private commit history Rewrite or curate history before publishing it or merging into other branches

Workflows Distributed model and cheap branching allows numerous types of workflows Push model: Centralized repository type Pull model: Integration manager type git workflows --help Read more in ProGit book

Workflow: Solo commit checkout Shantanu s Repo

Workflow: Solo commit checkout Shantanu s Repo pull push Official or Public Repo

Workflow: Centralized commit pull checkout Shantanu s Repo push commit checkout John s Repo pull push Official or Public Repo

Workflow: Integration Manager

Workflow: Integration Manager commit pull checkout Shantanu s Repo push commit checkout pull John s Repo pull Official or Public Repo

Workflow: Integration Manager commit pull checkout Shantanu s Repo push commit checkout pull pull John s Repo pull Official or Public pull Repo commit Curtis s Repo pull checkout

Learn More.. http://progit.org http://help.github.com http://eagain.net/articles/git-for-computerscientists/ Subversion folks: http://git.or.cz/course/ svn.html git man pages

MOTD Use Git Works off-line Personal logbook Curate and publish history Flexibility in workflows UABgrid docs: http://docs.uabgrid.uab.edu/wiki/usinggitfordevelopment

Additional Information

Git Installation Linux Package managers Source Windows http://code.google.com/p/msysgit/ Mac: Source Homebrew: http://mxcl.github.com/homebrew/

Add-on tools Access control: gitosis and gitolite GUI: gitk Display branch name is shell: http:// www.jonmaddox.com/2008/03/13/show-your-gitbranch-name-in-your-prompt/

Rewriting History Remove sensitive data from repository Rewrite commits - commit messages, committer names, timestamps and committed files Rewriting changes commit hash DON T rewrite commits of published history unless absolutely necessary Commands: rebase and filter-branch

Distributed repository model Curtis s Private Repo on laptop Curtis s Published Repo on Cheaha Official Repo git.uabgrid John s Published Repo on Cheaha Shantanu s Published Repo on Cheaha Shantanu s Private Repo on Cheaha

Git Objects Reference: http://progit.org/book/ch9-2.html

Repository Size and Packfiles Each commit is a complete snapshot Packs up several blob objects Creates index file(s) and pack file(s) Latest commit includes a complete copy Older commits contain deltas git gc - cleanup and optimization References: http://progit.org/book/ch9-4.html http://book.git-scm.com/7_the_packfile.html

Git with large files Limitations: Compression Checksums Deltas Memory http://caca.zoy.org/wiki/git-bigfiles - few hundred MB http://git-annex.branchable.com/ - tracks content/files without checking it in

Git with binary files Configurable with external diff tool Create a new type according to file extension Configure diff tool for the new type Details: http://progit.org/book/ch7-2.html

Best Practices Work in a private and non-tracking local branch Granular commits - easier to squash commits together than split commits Fetch and merge Create ticket or issue specific branches

Git or Mercurial Google s analysis: http://code.google.com/p/support/wiki/dvcsanalysis Answer to Google s analysis: http://felipec.wordpress.com/2011/01/16/mercurialvs-git-its-all-in-the-branches/ Speed and size: http://draketo.de/proj/hg-vs-git-server/testresults.html

Language Git: C and Perl Mercurial: Python Syntax Branches Community Git or Mercurial

git SSH http(s) Transport protocols

Community Support http://vger.kernel.org/vger-lists.html#git irc://irc.freenode.net/git http://letmegooglethatforyou.com/

Acknowledgments David Shealy John-Paul Robinson Bill Bradley Mike Hanby Poornima Pochana, Thomas Anthony

Questions???