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.

Slides:



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

Simple Git Steve Pieper. Topics Git considerations and Slicer Git as if it were svn Git the way it is meant to be.
om om GIT - Tips & Tricks / git.dvcs git-tips.com
Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
Chapter - 2 What is “GIT” VERSION CONTROL AND GIT BASICS.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Source Control Repositories for Team Collaboration: SVN, TFS, Git.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Git – versioning and managing your software L. Grewe.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Version control Using Git Version control, using Git1.
Version Control. How do you share code? Discussion.
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
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
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.
Sofia Event Center May 2014 Martin Kulov Git For TFS Developers.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
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.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
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.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Dr. Tanusri Bhattacharya
Version Control Systems
CS5220 Advanced Topics in Web Programming Version Control with Git
M.Sc. Juan Carlos Olivares Rojas
Git primer Landon Cox January 19, 2017.
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
11 Version control (part 2)
GIT AND GITHUB WORKSHOP
LECTURE 2: Software Configuration Management
Version Control.
Git Practice walkthrough.
Code Management Releases
Git for Visual Studio Developers MARTIN KULOV, ASE
CS5220 Advanced Topics in Web Programming Version Control with Git
Software Engineering for Data Scientists
Version Control with Git and GitHub
Version Control Systems
Version Control System
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
LECTURE 3: Software Configuration Management
Introduction to Configuration Management
Git CS Fall 2018.
GitHub and Git.
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Hop Aboard the Git Train – Transitioning from TFVC
Git GitHub.
Presentation transcript:

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 everything from small to very large projects with speed and efficiency.” ▪ Multi Platform (Windows, MAC, Linux, Android!) [SGit]SGit ▪ Open Source [GitHub Repository]GitHub Repository ▪ Distributed Source Control [Centralised / Distributed]CentralisedDistributed – Centralized VCS systems are designed with the intent that there is One True Source that is Blessed, and therefore good. All developers work (checkout) from that source, and then add (commit) their changes, which then become similarly Blessed. – In a distributed model, every developer has their own repo. Sue’s changes live in her local repo, which she can share with Joe or Eve. Distributed version control focuses on sharing changes; every change has a unique id. – Use Case: In a distributed model, two Developers can work on the same story sharing changes without affecting the main branches – Aiding TDD?.

What is GIT (2 of 2) ▪ Developed by Linus Torvalds (Founder of Linux) loosely based on Bit Keeper SCM [Interview]Interview ▪ Widely adopted in the Industry. – Including favour with Microsoft [Support Announcement]Support Announcement – Integrates with Visual Studio and Visual Studio Online (VSO)

Key Differences between TFS and GIT ▪ TFS is Centralised. ▪ GIT does not need separate local copies for each environment (IE: DEV/UAT/Release 1.31) ▪ Each branch in TFS is expensive (Each branch is a full copy of the code). In GIT branches merely reference a snapshot and contain the changes. ▪ No need to maintain release branches in GIT (Labelling in TC?) ▪ Source Control Explorer is not available for GIT (Visual Studio) ▪ GIT is at its best when using “Feature Branches” – One Branch per User Story – Each Story/Branch is progressed independently and in isolation to unrelated changes. – Individual stories can be deployed to Live.

Some Other Advantages of GIT ▪ Disposable Experimentation [Source]Source – “Disposable Experimentation. Create a branch to experiment in, realize it's not going to work, and just delete it - abandoning the work—with nobody else ever seeing it (even if you've pushed other branches in the meantime).” ▪ Offline Access to the REPO [Source]Source – “When I'm working at home (or in an airplane or train), I can see the full history of the project, every single check-in, without starting up my VPN connection to work and can work like I were at work: checking, checkout, branch, anything.” ▪ GIT is fast – “Nearly all operations are performed locally, giving it a huge speed advantage on centralized systems that constantly have to communicate with a server somewhere”. [Why you should switch to GIT] [Quote]Why you should switch to GITQuote

Disadvantages of Adopting GIT ▪ Initial Learning Curve ▪ Transition from different technology (IE: TFS) affecting things such as Build Processes

GIT Branches (1 of 2) ▪ “A branch in Git is simply a lightweight movable pointer to a commit” ▪ “As you start making commits, you’re branch points to the last commit you made. Every time you commit, it moves forward automatically.”

GIT Branches (2 of 2)

Tools for Interacting with GIT ▪ Visual Studio ▪ Visual Studio 2015 (Improved over VS 2013). ▪ Command Line Interface – IE: PowerShell. ▪ GitHub / SmartGit and many more. ▪ Combination of multiple tools at once. ▪ I recommend a combination of Visual Studio and Command Line

The Three States [Source]Source ▪ Git has three main states that your files can reside in; committed, modified and staged. – Committed means that the data is safely stored in your branch. – Modified means that you have changed the file but have not committed it to your branch yet – Staged means that you have marked a modified file in its current version to go into your next commit. ▪ You can only work in one branch at a time. COMMIT or STASH changes if you need to change Branch ▪ “The major difference between Git and any other is the way Git thinks about its data. Conceptually, most systems store information as a list of file-based changes. These systems think of the information they keep as a set of files and the changes made to each file over time.” ▪ “Git doesn’t think of or store its data this way.Git thinks of its data more like a set of snapshots of a file system. Every time you commit, or save the state of your project in Git, it takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again, just a link to the previous identical file it has already stored.”

Key Terminology ▪ REPO: The Repository / Project which contains multiple branches (IE: JLR DSE). ▪ CLONE: Downloads a REPO to your local machine. ▪ INIT: Starts a new REPO on your local machine. ▪ FETCH: Looks for changes in the remote REPO. (Get History) ▪ PULL: Downloads the latest commits from the remote REPO to your current Branch (Get Latest) ▪ COMMIT: A check-in of changes to files (Performed locally) ▪ PUSH: Uploads the commits you have made to the current Branch up to the remote REPO ▪ CHECKOUT: Switches to a different branch on your local machine. ▪ Prefix any command line executions with GIT (IE: GIT PULL OR GIT COMMIT)

Getting Started with GIT ▪ Install GIT (If you don’t have it already) [Link] [Link] ▪ CLONE a REPO – Cloning downloads a REPO and attaches the REMOTE ORIGIN ▪ PULL Branches – Download the key branches (IE, DEV, UAT, PDT, MASTER) – GIT CHECKOUT ORIGIN DEV – Download the remote Branch called DEV to your local REPO and make it the Current Branch.

Working on your Story ▪ Get Latest – GIT CHECKOUT DEV – GIT PULL ▪ Create a Feature Branch – Feature Branch Naming Convention: “12345\StoryDescription” (Future Proof Description) – GIT BRANCH 12345\StoryDescription – GIT CHECKOUT 12345\StoryDescription ▪ Modify Files – Alter your files…. – GIT COMMIT –m “This is what my commit adds” – GIT PUSH

Merging your Story into DEV ▪ Dev Test on your Local Machine ▪ Create a Pull Request (Ready for Peer Review)

Code Review and Peer Test ▪ Other Developers Access Pull Request.

Quick Demo (If there is time)