Git. What’s Git? A British swear A Distributed Version Control System Developed in 2005 by Linus Torvalds for use on the Linux Kernel Git Logo by Jason.

Slides:



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

Introduction to Git 2011 F2E Summit Jenny Donnelly, YUI.
om om GIT - Tips & Tricks / git.dvcs git-tips.com
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
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,
Introduction to Version Control with SVN & Git CSC/ECE 517, Fall 2012 Titus Barik & Ed Gehringer, with help from Gaurav.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
علیرضا فراهانی استاد درس: جعفری نژاد مهر 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.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
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.
Drexel University Software Engineering Research Group Git for SE101 1.
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.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
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.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
Git Super Basics. What is Git? Version Control System (VCS) Successor to SVN in the Drupal eco-system A tool.
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 System Lisa Palathingal 03/04/2015.
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 :
Falcons Git Usage Andre Pool Version 2.0 October 2015 / Veldhoven.
Lecture 2 Making Simple Commits Sign in on the attendance sheet! credit:
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
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.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
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.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Git for bzr users October Aurélien Gâteau An attempt at making you comfortable when you have to work with a git repository.
Backing up a machine with git
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Introduction to Git and git-svn Paul Gier Red Hat Sept. 27, 2011.
CS5220 Advanced Topics in Web Programming Version Control with Git
Introduction to Version Control with Git
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
11 Version control (part 2)
CReSIS Git Tutorial.
Git Practice walkthrough.
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control System using Git
Git branches and remotes
Software Engineering for Data Scientists
Sign in on the attendance sheet!
Storing, Sending, and Tracking Files Recitation 2
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
The Big Picture
SIG: Open Week 1: GitHub Tim Choh.
Source Code Repository
Using Github.
Git CS Fall 2018.
Version Control System - Git
Version control with Git
Git started with git: 2018 edition
Git Fundamentals.
Git Introduction.
Git GitHub.
Introduction to The Git Version Control System
Presentation transcript:

Git

What’s Git? A British swear A Distributed Version Control System Developed in 2005 by Linus Torvalds for use on the Linux Kernel Git Logo by Jason Long used under Creative Commons Attribution License. See

2 b i α 1 b i 1 a i How does Git work? Maintains a repository of changes to a folder The directory can be “saved” (committed) or “opened” (checked out) at any version Working Tree Repository 0ef19fe14ce 997bf04ea5 5f7b5ac909 Folder icon in public domain. See

But wait, there’s more! You can branch your tree, so you can work on multiple features at once You can share your changes with other developers Repository 0ef19fe14ce 997bf04ea5 5f7b5ac bd722f 360acfe22 Repository Other Repository

How do I start with Git? Install it ◦Command line ◦GUI version Create a new repo with git init ls app bower.json css Gruntfile.js img js node_modules package.json test git init Initialized empty Git repository in ~/gitdemo/.git/ $> $>

How do I add files to Git? Files and folders are not tracked by default Files must be staged before committing with git add git status # On branch master # Initial commit # Untracked files: # (use "git add <file>..." to include in what will be committed) # Gruntfile.js # app/ # bower.json # img/ # package.json # test/ nothing added to commit but untracked files present (use "git add" to track) $> $> $> git add. git status # On branch master # Initial commit # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # new file:.bowerrc # new file:.editorconfig # new file: Gruntfile.js # new file: app/.htaccess # new file: app/404.html # new file: app/favicon.ico # new file: app/index.html...

How do I commit my files? Save your changes with git commit $>git commit [master (root-commit) 645e836] Initial Commit Committer: yule 19 files changed, 1564 insertions(+), 0 deletions(-) create mode bowerrc create mode editorconfig create mode gitignore create mode jshintrc create mode Gruntfile.js create mode app/.htaccess create mode app/404.html create mode app/index.html...

How do I update and commit? Edit your files Stage your changes Commit them Combine both using git commit -a $> $> $> vi app/index.html git add app/index/html git commit -m "Made app awesome" [master 4acef2f] Made app awesome Committer: yule 1 files changed, 1 insertions(+), 0 deletions(-)

What about removing files? Can’t just delete the file Have to use git rm Or use git commit -a $> $> rm app/favicon.ico git status # On branch master # Changed but not updated: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: app/favicon.ico # no changes added to commit (use "git add" and/or "git commit -a") $> $> git rm app/favicon.ico rm 'app/favicon.ico' git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: app/favicon.ico

How do branches work? Create using git branch Change working tree with git checkout Combine with git merge $> $> $> $> $> git branch sweet git branch * master sweet git checkout sweet Switched to branch 'sweet‘ vi Gruntfile.js git commit -a -m "Added ownership" [sweet 43bcbd5] Added ownership Committer: yule 1 files changed, 2 insertions(+), 0 deletions(-) $> $> git checkout master Switched to branch 'master' git merge sweet Updating 4acef2f..43bcbd5 Fast-forward Gruntfile.js | file changed, 2 insertions(+), 0 deletions(-)

How can I share my changes? Update from a remote repo using git pull Send changes using git push git pull remote: Counting objects: 7, done. remote: Compressing objects: 100% (4/4), done. remote: Total 4 (delta 3), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. From remote/gitdemo 4acef2f..43bcbd5 master -> origin/master 4acef2f..43bcbd5 sweet -> origin/sweet Updating 4acef2f..43bcbd5 Fast-forward Gruntfile.js | 2 ++ app/favicon.ico | Bin > 0 bytes 2 files changed, 2 insertions(+), 0 deletions(-) delete mode app/favicon.ico $>vi package.json git commit -a -m "Hello" [master 2bc6f5f] Hello Committer: yule 1 files changed, 1 insertions(+), 1 deletions(-) git push Counting objects: 5, done. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 309 bytes, done. Total 3 (delta 2), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. To remote 43bcbd5..2bc6f5f master -> master $> $> $>

Other points You can create a file called.gitignore that lists file extensions git won’t include To create a local copy of a repository, use git clone

Exercise 1.Install Git 2.Go to 3.Clone the repo 4.Make a branch 5.Make a change to that branch 6.Commit your change