GIT: (a)Gentle InTroduction Bruno Bossola. Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A.

Slides:



Advertisements
Similar presentations
Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Advertisements

Git Branching What is a branch?. Review: Distributed - Snapshots Files are stored by SHA-1 hash rather than filename Stored in git database in compressed.
Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Fundamentals of Git By Zachary Ling 29 th, Aug,
Version control Using Git 1Version control, using Git.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Introduction to Version Control with SVN & Git CSC/ECE 517, Fall 2012 Titus Barik & Ed Gehringer, with help from Gaurav.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
GIT An introduction to GIT Source Control. What is GIT (1 of 2) ▪ “Git is a free and open source distributed version control system designed to handle.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Version control Using Git Version control, using Git1.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to Version Control with Git CSC/ECE 517, Fall 2014 A joint project of the CSC/ECE 517 staff, including Titus Barik, Gaurav Tungatkar, Govind.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
1 © 2015 Albion College | BUGMI 2015 Git’s Architecture And How It Relates to Banner Eddie Bachle Albion College September 25, 2015.
Sofia Event Center May 2014 Martin Kulov Git For TFS Developers.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Page 1 TBD 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy Paris Tél : Fax :
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
An Introduction to Git David Johndrow COMP 490 – Senior Design & Development 2/11/16.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
Collaborative Git An introduction to Git with others
Git Girish Git VCS that I have used ClearCase, cvs, svn Happy p4 user.
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Dr. Tanusri Bhattacharya
CS5220 Advanced Topics in Web Programming Version Control with Git
Introduction to Version Control with Git
4 Version control (part 1)
Information Systems and Network Engineering Laboratory II
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
Version Control Systems
11 Version control (part 2)
LECTURE 2: Software Configuration Management
Code Management Releases
Version control, using Git
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control System using Git
Git branches and remotes
Software Engineering for Data Scientists
Storing, Sending, and Tracking Files Recitation 2
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
LECTURE 3: Software Configuration Management
The Big Picture
Git CS Fall 2018.
Version Control System - Git
Version control with Git
Introduction to Version Control with Git
Version Control with Git
GitHub and Git.
Version Control with Git and GitHub
Git Fundamentals.
Git Introduction.
Keeping your SQL Code safe
Introduction to The Git Version Control System
Introduction To GitHub
Presentation transcript:

GIT: (a)Gentle InTroduction Bruno Bossola

Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A

Hey dude who are ya?? Developer since 1988 XP Coach during 2k Co-founder and coordinator of JUG Torino Java Champion since 2005 Manager at Gitenterprise.com Working as contractor across Europe

About version control Picture courtesy of globalnerdy.com All rights kindly reserved

Centralized SCM CVS SVN Picture courtesy of progit.org. All rights kindly reserved

Distributed SCM Git Mercurial Bazaar Picture courtesy of progit.org. All rights kindly reserved

Concepts

Snapshots, not deltas Nearly every operation is local Integrity is a priority The “three states”

Snapshot, not deltas Deltas are maintained: CVS, SVN, Bazaar Picture courtesy of progit.org. All rights kindly reserved

Snapshot, not deltas Full file is maintained: Git, BitKeeper Picture courtesy of progit.org. All rights kindly reserved

Most operations are local Your local database contains a full copy of the remote(s) Browsing, changing, search happens locally Almost everything doable without network the db is a nice, separate.git folder :)

Integrity is a priority Everything in Git is check-summed –SHA-1 hash –40-character string such as 95b b16bb70ded20626c9c551ccd58 It's impossible to make a change without Git knowing it! Git generally only adds data

The three states modified staged committed all local operations! Picture courtesy of progit.org. All rights kindly reserved

Quick demo! Configuration Initializing a local repository Managing files Looking into history

Local operations

How does it work Git has an internal object database It contains – blob (files) – commit – tree – …and other stuff :)

After a commit... Picture courtesy of progit.org. All rights kindly reserved

After three commits... Picture courtesy of progit.org. All rights kindly reserved

A branch is a pointer Picture courtesy of progit.org. All rights kindly reserved

Creating a branch > git branch testing Picture courtesy of progit.org. All rights kindly reserved

HEAD HEAD: a special pointer so Git knows where you are Picture courtesy of progit.org. All rights kindly reserved

Switching to a branch Git moves HEAD pointer to the branch pointer > git checkout testing Switched to branch 'testing' Picture courtesy of progit.org. All rights kindly reserved

Change a file (on a branch) Git keeps following with HEAD the branch pointer > vi readme.txt > git commit -a -m 'readme file updated' Picture courtesy of progit.org. All rights kindly reserved

Switch to master Git moves back HEAD to point to master > git checkout master Picture courtesy of progit.org. All rights kindly reserved

And change again! > vi readme.txt > git commit -a -m 'readme file now rocks!' Git still keeping separate pointers to the branches Picture courtesy of progit.org. All rights kindly reserved

Time to merge! A new “merge” commit is generated > git merge testing Merge made by recursive. 1 files changed, 1 instions(+), 0 dltions(-) Picture courtesy of progit.org. All rights kindly reserved

Remote operations

What's a remote? You can have multiple remote repos – usually one, “origin” – sometimes one main r/w, other r/o, – rarely multiple Collaborating means pushing and pulling data from the remote repos

Using a remote: clone Move into an empty folder... – Different protocols are available git (native) http(s) ssh You get a full copy of the repository > git clone

(less usual) Add a remote Move into an existing git folder... Mostly used when working with multiple repositories > git remote add

Initial clone Picture courtesy of progit.org. All rights kindly reserved

How do it syncs? “master” is tracked automatically “fetch” command will download all the updates from the remote db – “merge” to merge the branches – “rebase” (let's see this later) “pull” is a shortcut for fetch + merge

I do some work... Picture courtesy of progit.org. All rights kindly reserved

Someone else pushes! Picture courtesy of progit.org. All rights kindly reserved

Synchronize with fetch Picture courtesy of progit.org. All rights kindly reserved

What next? Fetch is just fetching all the data, nothing changes To update your master copy to the remote you may: – Merge – Rebase You can have done a pull (fetch + merge)

Merge! Git uses an automatic three-ways merge algorithm very efficient :) Most of the time it's a piece of cake Any conflict not resolved automarically must be resolved... by you (as usual!)

Rebase! First removes from the target branch the diverging commits Then adds all the changes committed on the source other branch Then adds your commits on top

Rebase! After a rebase,,, Picture courtesy of progit.org. All rights kindly reserved

Rebase! No differences in result Much cleaner history Branches are then easy to integrate to the master

Quick demo! Cloning a repo Fetching from a remote Merging and rebasing

Enterprise adoption

Issues in the enterprise? No security out of the box – secure protocols are based on OS services – no way to restrict the access to a repository – no way to lock a branch – no audit – you can commit in behalf of someone else

More issues in the enterprise! No easy setup for users and groups administration is a pain (again based on the OS services) Only basic repository visualization (and nothing on the remote)

Solutions? use a predefined solution on top of a *nix environment – gitolite (requires *nix os) – gitosis (requires *nix os) – gerrit (not 100% git, but works well) get an industrialized service/solution – gitenterprise (yeah, the shameless plug, finally!) – Github-fi (guess what? now called github enterprise) – …not much more here :)

Questions?

Thanks!