Git : Part 2 Checkout, Add, Commit These slides were largely cut-and-pasted from tutorial/, with some additions.

Slides:



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

An Introduction By Sonali and Rasika.  Required for the project  Show the versions of your code in the course of development  Show versions of your.
Git : Part3 Branch Management These slides were largely cut-and-pasted from tutorial/, with some additions.
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.
Introduction to git Alan Orth Nairobi, Kenya September, 2010 version control for serious hackers ;)
Carnegie Mellon 1 Debugging and Version control / : Introduction to Computer Systems 12 th Recitation, Nov. 14, 2011 Slides by: Lin Xiao(lxiao)
Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
1 Web Design Workshop DIG 4104c Spring 2014 Dr. J. Michael Moshell University of Central Florida Lecture 2: The git source control system
Git
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git: Part 1 Overview & Object Model These slides were largely cut-and-pasted from tutorial/, with some additions.
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,
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.
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.
Peter Ogden and Josh Levine.  Motivation  High level overview  Walk through the common operations  How not to break things (too badly)
Git – versioning and managing your software L. Grewe.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Git Michael Backherms. What is Git? Free Software Development Tool o Speedy tool for distributed revision control and source code management Designed.
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.
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.
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.
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.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
GIT: What, how and why ? Part 1: Basics. What do I know about git? Started using it for experiments on April 2009 Moved all voms development on git on.
INTRODUCTION TO GIT. Install Egit for eclipse Open eclipse->Help->Install New Software Search for one of the following -
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Carl’s Ultra-Basic Guide to the Command Line and Git Carl G. Stahmer Director of Digital Scholarship cstahmer UD Davis Data Science.
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 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 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
Version Control Systems
Source Control Systems
Version Control Systems
11 Version control (part 2)
CReSIS Git Tutorial.
Git Practice walkthrough.
SSE2034: System Software Experiment 3 Spring 2016
Subversion Reasons to use How it works Subversion important commands
Git branches and remotes
Software Engineering for Data Scientists
Version Control Systems
An introduction to version control systems with Git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
The Big Picture
An introduction to version control systems with Git
EGit in CCS
Source Code Repository
Version Control System - Git
Version control with Git
Git Introduction.
Git GitHub.
Advanced Git for Beginners
Presentation transcript:

Git : Part 2 Checkout, Add, Commit These slides were largely cut-and-pasted from tutorial/, with some additions from other sources. I have deleted a lot from the cited tutorial, and recommend that you listen to the entire tutorial on line, if you can. tutorial/

Topics Review Creating an empty repository Adding file changes to it Committing the changes Git naming conventions for commits Git commands for getting information about a repository

Review Core git concepts

Git object model

Git components Index – “staging area” – what is to be committed

Local Operations add (stage) files Working directory Repository (.git directory) Index (staging area) checkout the project commit

Git transport commands

Git init, add, commit Using basic local operations to work on a single branch.

Bootstrap mkdir project cd project git init

Work touch test

Stage touch test git add test

Commit touch test git add test git commit –m”test”

Work & Stage touch test git add test git commit –m”test” mkdir dir echo “foo” > dir/foo git add dir/foo

Commit again touch test git add test git commit –m”test” mkdir dir echo “foo” > dir/foo git add dir/foo git commit –m”foo”

Naming How to refer to a commit

A commit can be identified by 6bb1270ffb60cbfef87266d2d4b44abe4218d9c68 6bb127 V master origin/master “:/some text: HEAD FETCH_HEAD ORIG_HEAD full hash short hash tag local branch remote branch message checkout last fetch previous head …

Other naming methods HEAD^, HEAD^^, … MASTER^, MASTER^^, … HEAD~1, HEAD~2, or B A HEAD^

Getting information See the state of your repository, and review the history.

git status Shows what is – Staged – Unstaged – Untracked

git diff – index vs. working files git diff –staged – HEAD vs. index git diff HEAD – HEAD vs. working files git diff

git show – summarizes the last commit git show –stat – shows just the statistics git show –name-status – shows status Can apply to any commit git show HEAD git show master^^ … Or to a file git show HEAD:file

git log Shows history of changes Can apply to any single commit or range git log git log tag..branch git log HEAD~10.. git log ~10 Or attributes of commits, etc. etc. git log --since=“May 1” –until=“June 1” git log --author=fred git log --grep-”commit.*message.*text” …

git grep git grep –e “pattern” -- some/file git grep –e “pattern” branch -- some/file

Viewing references Named Refer to commits Can be moved 3 basic types: – Tags – Local branches – Remote branches

Tags To list tags: git tag –l web2py web2py web2py Or look at the files in.git/refs/tags/

Local branches To list them: git branch –l branch1 branch2 * master Or look at files in.git/refs/heads/

Remote branches To see them: git branch –r origin/HEAD -> origin/master origin/master origin/update Or look at files in.git/refs/remotes/