…using Git/Tortoise Git

Slides:



Advertisements
Similar presentations
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Advertisements

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
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
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.
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.
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
Version control Using Git Version control, using Git1.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic 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.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
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.
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.
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
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.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
GIT: (a)Gentle InTroduction Bruno Bossola. Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A.
Dr. Tanusri Bhattacharya
Information Systems and Network Engineering Laboratory II
Version Control Systems
11 Version control (part 2)
LECTURE 2: Software Configuration Management
Git Practice walkthrough.
Version Control overview
Version control, using Git
Version Control System using Git
Software Engineering for Data Scientists
Version Control with Git and GitHub
An introduction to version control systems with Git
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
Source Code Management
LECTURE 3: Software Configuration Management
Introduction to Configuration Management
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Source Code Repository
Git CS Fall 2018.
Version Control System - Git
Git started with git: 2018 edition
Git Fundamentals.
Git Introduction.
Git GitHub.
Introduction to The Git Version Control System
Presentation transcript:

…using Git/Tortoise Git Version Control …using Git/Tortoise Git By CP

What is Version Control? “A system that records changes to a file or set of files over time so that you can recall specific versions later” Works for *ANY* file type A Time machine for your files

Why Version Control? Version Control saves lives!

Version Control Types Local Version Control System

Version Control Types Centralized Version Control Systems

Version Control Types Distributed Version Control Systems Git Fully mirrored repository for each client Best Crash protection possible Git

Q: Who uses Git? A: Everyone.

Q: Who wrote Git? A: God.

How does it work? You: Files files files; Git: Snapshot! Every ‘commit’ is saving the state of your project A snapshot of how the files look like at that moment and stores a ‘reference’ to that snapshot File is stored ONLY if it has changed

How does it work? All operations happen locally No need for a network as long as you are coding on your own (though, you can’t collaborate without it) EVERYTHING is check summed Impossible to change the contents of any file or directory without Git knowing about it We’ll know if you crashed the build! Once you have committed, you CAN’T go back or delete Git believes in the true meaning of the word ‘commit’

The Three States of Git Modified Staged Committed File has been changed, but not committed to the local database yet Staged File has been ‘marked’ in its current version to go into the next commit snapshot Committed Data is safely stored in your local database

The Three States of Git Staging Area It’s a file that stores information about what will go into the next commit Also referred to as the ‘index’

Hence, the simplified workflow… Clone a repository from the cloud :ONLY ONCE: Modify/Change, add new files in the working directory ‘Stage’ the files, adding snapshots of them to the staging area Make a ‘commit’. This takes the files as they are in the staging area and stores that snapshot permanently in the local Git directory ‘Push’ the changes back to the cloud

Get Git Please install in the following sequence The Git (default settings) https://code.google.com/p/msysgit/downloads/list Interface for Humans – Tortoise Git https://code.google.com/p/tortoisegit/wiki/Download Cloud https://bitbucket.org/ ONLY REGISTER from my invitation

Setup Git Tell Git who you are…..

Setup Git Tell Git where the cloud repository is….

Setup Git Tell Git where the cloud repository is….

Setup Git ‘Clone’ it!

Working with Git Once the repository in the cloud has been ‘cloned’, you can make changes/modifications/add files In case you add new files, inform Git about them by using the ‘Add’ command

Working with Git Once you are done, Commit!

Working with Git ‘Push’ changes back into the cloud

Working with Git ‘History’ of snapshots

Working with Git Git, The Time Machine

Branching Divide and rule!

Branching Revision Graph is a great tool ton visualize branching in Git

Branching When you commit in Git, Git stores a commit object that contains a pointer to the snapshot of the content you staged, the author and message metadata, and zero or more pointers to the commit or commits that were the direct parents of this commit: zero parents for the first commit, one parent for a normal commit, and multiple parents for a commit that results from a merge of two or more branches.

Branching A branch in Git is simply a lightweight movable pointer to one of the commits. The default branch name in Git is ‘master’. As you initially make commits, you’re given a master branch that points to the last commit you made. Every time you commit, it moves forward automatically.

Branching Creating a branch New branch creates a new pointer for the user to move around.

Branching Creating a branch

Branching HEAD: Pointer to the local branch the user is currently on Git uses HEAD to keep a track of where the user is When Git creates a new branch, it doesn’t automatically switches to it unless otherwise stated

Branching Switching the HEAD to the new branch and making a commit

Branching Now if you ‘checkout’ the ‘master’ branch, Git moves the HEAD back to the master + rewinds the files in the working directory to the snapshot that ‘master’ points to

Branching If you make a few more commits in the ‘master’ branch, the project history will diverge Typically, Branch off from parent branch to work on a feature Make a few commits Once the feature is finalized, ‘Merge’ it with your parent branch

Branching Merging Current state of the project You want to merge C4 and C5 snapshots

Branching Merging Because the commit on the branch you’re on isn’t a direct ancestor of the branch you’re merging in, Git does a simple three-way merge, using the two snapshots pointed to by the branch tips and the common ancestor of the two.  Instead of just moving the branch pointer forward, Git creates a new snapshot that results from this three-way merge and automatically creates a new commit that points to it. This is referred to as a ‘merge commit’ and is special in that it has more than one parent.

Branching Merging

Branching Merging Merge Commit

Branching Branching Workflows

Working with Remote Repository ‘Clone’ repository from the cloud Make commits, create branches

Working with Remote Repository ‘Push’ your local repository on the cloud

Working with Remote Repository Checking out the structure of your local repository One of the features of Git is that you cannot modify a branch created by a fellow collaborator. If you need to, you have to create your own branch from that particular commit. This ensures that each collaborators’ code remains consistent from their perspective.

Working with Remote Repository Moving around branches created by you

Working with Remote Repository Moving around branches created by others

Working with Remote Repository Moving around branches created by others

Working with Remote Repository When others are collaborating, it might happen that the structure of the repository in the cloud might change while you are working on the local repository

Working with Remote Repository To bring the latest repository image from the cloud to your local repository Do a ‘git fetch origin’

Working with Remote Repository After updating the local repository from the cloud, the local repository will look like this

Working with Remote Repository When creating branches to work on particular features, always create ‘Tags’ once the feature is finalized

Thank You! Phew…..! Stuff copied from http://git-scm.com/book