Introduction to the Git Version Control System



Similar documents
Version Control using Git and Github. Joseph Rivera

FEEG Applied Programming 3 - Version Control and Git II

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

Version control with GIT

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

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

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

Version Control with Git. Kate Hedstrom ARSC, UAF

MOOSE-Based Application Development on GitLab

Version Control with. Ben Morgan

MATLAB & Git Versioning: The Very Basics

Two Best Practices for Scientific Computing

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

Version Control with Git. Dylan Nugent

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

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

Version Control. Version Control

An Introduction to Mercurial Version Control Software

Introducing Xcode Source Control

Introduction to Version Control

Version Control! Scenarios, Working with Git!

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

Version Control with Git

Source Control Systems

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

Using Git for Project Management with µvision

Version Control for Computational Economists: An Introduction

Gitflow process. Adapt Learning: Gitflow process. Document control

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

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

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

An Introduction to Mercurial Version Control Software

Revision control systems (RCS) and

Distributed Version Control with Mercurial and git

Work. MATLAB Source Control Using Git

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

An Introduction to Git Version Control for SAS Programmers

AVOIDING THE GIT OF DESPAIR

Using Git for Centralized and Distributed Version Control Workflows - Day 3. 1 April, 2016 Presenter: Brian Vanderwende

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 Subversion

Version Control with Mercurial and SSH

Software Configuration Management and Continuous Integration

Data management on HPC platforms

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

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

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

CS108, Stanford Handout #33. CVS in Eclipse

Dry Dock Documentation

Introduction to Version Control with Git

Advanced Computing Tools for Applied Research Chapter 4. Version control

Zero-Touch Drupal Deployment

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

Version Control Tutorial using TortoiseSVN and. TortoiseGit

Introduction to Subversion

Working Copy 1.4 users manual

Version Control with Subversion and Xcode

Integrated version control with Fossil SCM

The Hitchhiker s Guide to Github: SAS Programming Goes Social Jiangtang Hu d-wise Technologies, Inc., Morrisville, NC

Version Control with Git

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

ECE 4750 Computer Architecture, Fall 2015 Tutorial 2: Git Distributed Version Control System

Version Control Systems

Modulo II Software Configuration Management - SCM

PxPlus Version Control System Using TortoiseSVN. Jane Raymond

Using Subversion in Computer Science

A Git Development Environment

Version control with Subversion

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

Version Control. Luka Milovanov

Subversion. Nadir SOUALEM. Linux Users subversion client svn or higher. Windows users subversion client Tortoise 1.6.

Version Control Script

Secure Linux Administration Conference Bernd Strößenreuther

Git Tutorial - How to Create a Full Project

Continuous Integration

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

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

Pro Git. Scott Chacon *

SVN Starter s Guide Compiled by Pearl Guterman June 2005

Continuous Integration. CSC 440: Software Engineering Slide #1

Version Control with Subversion

In depth study - Dev teams tooling

CSCB07 Software Design Version Control

Putting It All Together. Vagrant Drush Version Control

1. History 2. Structure 3. Git Comparison 4. File Storage 5. File Tracking 6. Staging 7. Queues (MQ) 8. Merge Tools 9. Interfaces

Version Uncontrolled! : How to Manage Your Version Control

Unity Version Control

How to Create a Free Private GitHub Repository Educational Account

CS 2112 Lab: Version Control

Using GitHub for Rally Apps (Mac Version)

Master s Thesis. git-sprite: Supporting Tool for Pull-Based Software Development Model. Yusuke Saito

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

VFP Version Control with Mercurial

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

Transcription:

Introduction to the Sebastian Rockel rockel@informatik.uni-hamburg.de University of Hamburg Faculty of Mathematics, Informatics and Natural Sciences Department of Informatics Technical Aspects of Multimodal Systems November 8, 2011 S. Rockel 1

Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 2

Introduction Universität Hamburg Introduction Git is.. from Linus Torwalds local (and remote if necessary) fast (well..) Comprehensiv Howto @ http://linux.yyz.us/git-howto.html S. Rockel 3

Introduction Universität Hamburg Introduction Git is.. from Linus Torwalds local (and remote if necessary) fast (well..) Comprehensiv Howto @ http://linux.yyz.us/git-howto.html S. Rockel 3

Introduction Universität Hamburg Introduction Git is.. from Linus Torwalds local (and remote if necessary) fast (well..) Comprehensiv Howto @ http://linux.yyz.us/git-howto.html S. Rockel 3

Introduction Universität Hamburg Introduction Git is.. from Linus Torwalds local (and remote if necessary) fast (well..) Comprehensiv Howto @ http://linux.yyz.us/git-howto.html S. Rockel 3

Introduction Universität Hamburg Insights Index under: <r e p o s i t o r y dir >/. g i t /.. Hashes every version in the index has its own unique SHA1 hash abbreviate it with the first few character S. Rockel 4

Introduction Universität Hamburg Insights Index under: <r e p o s i t o r y dir >/. g i t /.. Hashes every version in the index has its own unique SHA1 hash abbreviate it with the first few character S. Rockel 4

Configuration - User Setup Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 5

Configuration - User Setup Git per User Setup $HOME/.gitconfig 1 [ gui ] recentrepo = / Users / s e b a s t i a n / projekt090406 3 s p e l l i n g d i c t i o n a r y = en [ user ] 5 email = r o c k e l @ i n f o r m a t i k. uni hamburg. de name = Sebastian Rockel 7 [ merge ] t o o l = o p e n d i f f 9 summary = true [ c o l o r ] 11 d i f f = auto s t a t u s = auto 13 branch = auto [ core ] 15 a u t o c r l f = input S. Rockel 6

Configuration - Repository Setup Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 7

Configuration - Repository Setup Exclude Files per repo: <repository dir>/.git/info/exclude # L i n e s that s t a r t with # are comments. # For a p r o j e c t mostly i n C, the f o l l o w i n g # would be a good s e t of exclude p a t t e r n s # ( uncomment them i f you want to use them ) : #. [ oa ] ~. swp per (sub)dir: <some repo (sub) dir>/.gitignore. metadata/ /doc/ S. Rockel 8

Configuration - Repository Setup Exclude Files per repo: <repository dir>/.git/info/exclude # L i n e s that s t a r t with # are comments. # For a p r o j e c t mostly i n C, the f o l l o w i n g # would be a good s e t of exclude p a t t e r n s # ( uncomment them i f you want to use them ) : #. [ oa ] ~. swp per (sub)dir: <some repo (sub) dir>/.gitignore. metadata/ /doc/ S. Rockel 8

Basic Tasks - Commonly used Commands Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 9

Basic Tasks - Commonly used Commands Basic Tasks clone a remote repository: g i t clone git@github. com : buzzer /Robot Collaboration. g i t get the latest changes from remote repo: g i t fetch [ $branch a l l ] g i t p u l l [ o p t i o n a l ssh / https path again ] S. Rockel 10

Basic Tasks - Commonly used Commands Basic Tasks clone a remote repository: g i t clone git@github. com : buzzer /Robot Collaboration. g i t get the latest changes from remote repo: g i t fetch [ $branch a l l ] g i t p u l l [ o p t i o n a l ssh / https path again ] S. Rockel 10

Basic Tasks - Commonly used Commands Basic Tasks (cont d) stage changes for commit: g i t add. i $ f i l e s commit changes: g i t commit a m message revert version, checkout: g i t checkout [ f ]. $branch $hash S. Rockel 11

Basic Tasks - Commonly used Commands Basic Tasks (cont d) stage changes for commit: g i t add. i $ f i l e s commit changes: g i t commit a m message revert version, checkout: g i t checkout [ f ]. $branch $hash S. Rockel 11

Basic Tasks - Commonly used Commands Basic Tasks (cont d) stage changes for commit: g i t add. i $ f i l e s commit changes: g i t commit a m message revert version, checkout: g i t checkout [ f ]. $branch $hash S. Rockel 11

Basic Tasks - Commonly used Commands Basic Tasks (cont d) Get the current repo status Show current branch, changes, untracked files: g i t status Show commit history: g i t log Show textual diff of current changes: g i t d i f f S. Rockel 12

Basic Tasks - Commonly used Commands Basic Tasks (cont d) Get the current repo status Show current branch, changes, untracked files: g i t status Show commit history: g i t log Show textual diff of current changes: g i t d i f f S. Rockel 12

Basic Tasks - Commonly used Commands Basic Tasks (cont d) Get the current repo status Show current branch, changes, untracked files: g i t status Show commit history: g i t log Show textual diff of current changes: g i t d i f f S. Rockel 12

Basic Tasks - Branches Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 13

Basic Tasks - Branches Branches there might be life besides the master List available branches g i t branch [ a ] Create a new branch g i t branch $newbranch Switch to a new branch g i t checkout $newbranch S. Rockel 14

Basic Tasks - Branches Branches there might be life besides the master List available branches g i t branch [ a ] Create a new branch g i t branch $newbranch Switch to a new branch g i t checkout $newbranch S. Rockel 14

Basic Tasks - Branches Branches there might be life besides the master List available branches g i t branch [ a ] Create a new branch g i t branch $newbranch Switch to a new branch g i t checkout $newbranch S. Rockel 14

Basic Tasks - Branches Branches (cont d) Delete a branch g i t branch d D $newbranch S. Rockel 15

Special Usecases - GUI Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 16

Special Usecases - GUI Gui not needed but nice to have g i t fetch [ $branch a l l ] Display changes, prepare, execute commit g i t gui Show all commits, branches g i t k [ a l l ] S. Rockel 17

Special Usecases - GUI Gui not needed but nice to have g i t fetch [ $branch a l l ] Display changes, prepare, execute commit g i t gui Show all commits, branches g i t k [ a l l ] S. Rockel 17

Special Usecases - GUI Merge Tool normally not needed Git automatic merge is quite efficient if there are merge conflicts, a (system dependent, see Git config) merge tool can be used: g i t mergetool S. Rockel 18

Special Usecases - GUI Merge Branches Master branch M Work branch A and B merge A and B into M g i t checkout M # switch to branch M g i t merge A # merge A i n t o M g i t merge B # merge B i n t o M S. Rockel 19

Special Usecases - Tags Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 20

Special Usecases - Tags Don t forget the tags tag versions g i t tag v1. 3 git pull / push does not take tags into account g i t g i t p u l l fetch tags push tags S. Rockel 21

Special Usecases - Tags Don t forget the tags tag versions g i t tag v1. 3 git pull / push does not take tags into account g i t g i t p u l l fetch tags push tags S. Rockel 21

Special Usecases - Remote Repositories Outline Introduction Configuration User Setup Repository Setup Basic Tasks Commonly used Commands Branches Special Usecases GUI Tags Remote Repositories S. Rockel 22

Special Usecases - Remote Repositories Github https://github.com add remote repo g i t remote add o r i g i n $remoterepo S. Rockel 23

Special Usecases - Remote Repositories Github https://github.com add remote repo g i t remote add o r i g i n $remoterepo S. Rockel 23

Special Usecases - Remote Repositories SVN Working with a remote Subversion repository (but with git locally) git svn clone [ http l o c a t i o n of an svn r e p o s i t o r y ] Now you can work with the checked out directory as though it was a git repository S. Rockel 24

Appendix Universität Hamburg Thank You! Any questions? S. Rockel 25

Appendix - Further Reading Further Reading http://linux.yyz.us/git-howto.html http://help.github.com/git-cheat-sheets S. Rockel 26