Advanced Git for Beginners

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.
om om GIT - Tips & Tricks / git.dvcs git-tips.com
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: Part 1 Overview & Object Model These slides were largely cut-and-pasted from tutorial/, with some additions.
Distributed Version Control. Image stolen from which is really good, go read it.  Old-school version control.
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 ▪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)
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
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.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
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.
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.
INTRODUCTION TO GIT. Install Egit for eclipse Open eclipse->Help->Install New Software Search for one of the following -
Technical Presentation by: David Spano. About Git (VCS) Simple Git Commands Branching Github Git GUI Summary.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Introduction to Git Thomas.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
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.
Version Control Systems
Basics of GIT for developers and system administrators
CS5220 Advanced Topics in Web Programming Version Control with Git
M.Sc. Juan Carlos Olivares Rojas
Primož Gabrijelčič Git for Programmers Primož Gabrijelčič
11 Version control (part 2)
CReSIS Git Tutorial.
Git-Github Safa Prepared for the course COP4331 – Fall 2016.
Git Practice walkthrough.
SSE2034: System Software Experiment 3 Spring 2016
Git branches and remotes
Software Engineering for Data Scientists
Version Control with Git and GitHub
Version Control Systems
Let’s start with some questions:
An introduction to version control systems with Git
SU Development Forum Introduction to Git - Save your projects!
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
Anatomy of a Git Project
SIG: Open Week 1: GitHub Tim Choh.
An introduction to version control systems with Git
Git-Github Tools Prepared for COP4331. Git-Github Tools Prepared for COP4331.
Git CS Fall 2018.
Version Control System - Git
Version control with Git
Introduction to Git and GitHub
Version Control with Git and GitHub
Git Fundamentals.
Version/revision control via git
Git Introduction.
Intro to Git and GitHub Version Control using Git Carol Schofield
Introduction to Git and Github
Git GitHub.
Introduction to The Git Version Control System
Presentation transcript:

Advanced Git for Beginners Derrick Stolee Microsoft @stolee https://stolee.dev/docs/git.pptx

About me Derrick Stolee Software Engineer Git Ecosystem Git Git for Windows VFS for Git https://github.com/git/git/graphs/contributors

About me Derrick Stolee Live in Raleigh Work in RDU Dr. Kathryn Stolee SE Faculty at NCSU Looking for RAs!

SE & Program Manager (PM) Internship Available roles and opportunities Explore Microsoft SE & Program Manager (PM) Internship Full-Time SE & PM Links to these applications are also found at https://microsoft.com/university

How to Learn Git? Play with it! Read about it. Use it with other people! Free e-book: https://git-scm.com/book/en/v2 10.2 Git Internals - Git Objects 2.3 Git Basics - Viewing the Commit History 2.2 Git Basics - Recording Changes to the Repository

Where to Get Git? Linux: sudo apt-get install git Windows: https://github.com/git-for-windows/git/releases Mac: brew install git https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

How to follow along? $ git clone https://github.com/git/git $ cd git $ git reset --hard v2.23.0

How to follow along? $ git clone https://github.com/git/git $ cd git $ git reset --hard v2.23.0

Object Model

Object Model: Content-Addressable Data Store Every object has a SHA-1 hash: 40 hex characters. Given 40 hex characters, we can find the unique object with that hash.

Object Model: Content-Addressable Data Store

Object Model: Blob (Block) A blob contains file contents. Note: the file name is not part of the object!

Object Model: Tree (Triangle) A tree contains folder contents. Contains names of files and folders inside Contains blobs (files) and trees (folders) Includes file mode (Unix file permissions)

Object Model: Tree (Triangle) A tree contains folder contents.

Object Model: Commit (Circle) A commit contains many things: A root tree. A list of parent commits. A commit message An author name, email, time. A committer name, email, time. git config –global user.name “My Name” git config --global user.email me@place.com

Object Model: Commit (Circle) A commit contains many things: A root tree. A list of parent commits. A commit message An author name, email, time. A committer name, email, time.

Object Model: Commit (Circle) A commit contains many things: A root tree. A list of parent commits. A commit message An author name, email, time. A committer name, email, time.

Object Model: Merkle Tree

IMPORTANT: Commits are NOT diffs! File renames are Detected dynamically!

Branches: Pointers to commits HEAD Branches: Pointers to commits shipped master topic

git is DISTRIBUTED version control! HEAD git is DISTRIBUTED version control! shipped master topic

git switch : move between branches (New in v2.23.0, replaces half of “git checkout”) Change HEAD to point to new branch Updates working directory to match commit’s tree

Working Directory, Staging, Committed EXAMPLE! https://stackoverflow.com/questions/3689838/whats-the-difference-between-head-working-tree-and-index-in-git

Working Directory, Staging, Committed EXAMPLE! https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository

Advanced! Working Directory, Staging, Committed Interactive add: git add -p Presents the patch-diff in parts that you can add in pieces, or even modify in-place! git add -p git commit -a EXAMPLE! https://git-scm.com/docs/git-add#Documentation/git-add.txt-patch

git status is your friend

Working with Remotes If you clone, you create special remote ‘origin’. You can have a LOT of remotes!

Working with Remotes Get new data: git fetch <remote> [branch] Upload your data: git push <remote> <branch> Hot Take: Don’t use git pull! This does the following: 1. git fetch 2. git merge This can have unexpected results! Instead, do your merges yourself!

https://stackoverflow https://stackoverflow.com/questions/3689838/whats-the-difference-between-head-working-tree-and-index-in-git

Stop! Collaborate! Listen! https://github.com/microsoft/git/pull/180

Git Commands to Look Up git config git log git rebase git merge git fetch git push git add git status git reset git checkout git switch git restore git diff git remote

Reading List Supercharging the Git Commit Graph Part I Part II Part III Part IV Exploring new frontiers for Git push performance These slides: https://stolee.dev/docs/git.pptx https://git-scm.com/doc https://ohshitgit.com/ http://stevelosh.com/blog/2013/04/git-koans/ File History Simplification What’s the difference between HEAD, working tree and index? Write Yourself a Git

SE & Program Manager (PM) Internship Available roles and opportunities Explore Microsoft SE & Program Manager (PM) Internship Full-Time SE & PM Links to these applications are also found at https://microsoft.com/university

Bonus! Tags: pointers to anything