![Page 1: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/1.jpg)
Git
![Page 2: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/2.jpg)
Git Reference
http://gitref.org/
![Page 3: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/3.jpg)
![Page 4: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/4.jpg)
Pro Githttp://git-scm.com/book
![Page 5: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/5.jpg)
![Page 6: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/6.jpg)
![Page 7: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/7.jpg)
![Page 8: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/8.jpg)
![Page 9: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/9.jpg)
![Page 10: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/10.jpg)
![Page 11: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/11.jpg)
![Page 12: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/12.jpg)
How to think like Git
![Page 13: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/13.jpg)
![Page 14: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/14.jpg)
![Page 15: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/15.jpg)
![Page 16: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/16.jpg)
![Page 17: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/17.jpg)
this is all Git is
![Page 18: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/18.jpg)
The Git Object Model
![Page 19: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/19.jpg)
The SHA
6ff87c4664981e4397625791c8ea3bbb5f2279a3
![Page 20: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/20.jpg)
The SHA: why it's awesome
● Git can quickly determine whether two objects are identical or not, just by comparing names.
![Page 21: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/21.jpg)
The SHA: why it's awesome
● Git can quickly determine whether two objects are identical or not, just by comparing names.
● Since object names are computed the same way in every repository, the same content stored in two repositories will always be stored under the same name.
![Page 22: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/22.jpg)
The SHA: why it's awesome
● Git can quickly determine whether two objects are identical or not, just by comparing names.
● Since object names are computed the same way in every repository, the same content stored in two repositories will always be stored under the same name.
● For the same reason, different content created in two different repositories will never have conflicting names.
![Page 23: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/23.jpg)
The SHA: why it's awesome
● Git can quickly determine whether two objects are identical or not, just by comparing names.
● Since object names are computed the same way in every repository, the same content stored in two repositories will always be stored under the same name.
● For the same reason, different content created in two different repositories will never have conflicting names.
● Git can detect errors when it reads an object by checking that the object's name is still the SHA1 hash of its contents.
![Page 24: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/24.jpg)
The SHA: why it's awesome
● Git can quickly determine whether two objects are identical or not, just by comparing names.
● Since object names are computed the same way in every repository, the same content stored in two repositories will always be stored under the same name.
● For the same reason, different content created in two different repositories will never have conflicting names.
● Git can detect errors when it reads an object by checking that the object's name is still the SHA1 hash of its contents.
![Page 25: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/25.jpg)
Blobs
● Content only (no filenames)● Single revision (changes are
represented as new blobs)
![Page 26: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/26.jpg)
Trees
● Directory hierarchy and filenames● Single revision (changes are
represented as new trees which might reference existing trees and blobs)
![Page 27: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/27.jpg)
Commits
● Annotated top-level tree● Most prominent object in day-to-
day use
![Page 28: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/28.jpg)
![Page 29: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/29.jpg)
Tags
● Attaches an arbitrary name to an object (usually a commit)
● Commonly used for releases
![Page 30: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/30.jpg)
The Git Repository
and some day-to-day examples
![Page 31: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/31.jpg)
The .git directory
![Page 32: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/32.jpg)
The working directory
![Page 33: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/33.jpg)
Committing a file
![Page 34: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/34.jpg)
Committing a file
![Page 35: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/35.jpg)
The git index
![Page 36: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/36.jpg)
The git index
![Page 37: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/37.jpg)
http://ericsink.com/vcbe/html/directed_acyclic_graphs.html
![Page 38: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/38.jpg)
Remote Repositories, multiple branches, and merging
![Page 39: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/39.jpg)
Remote repositories
![Page 40: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/40.jpg)
Remote repositories
![Page 41: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/41.jpg)
![Page 42: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/42.jpg)
![Page 43: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/43.jpg)
![Page 44: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/44.jpg)
![Page 45: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/45.jpg)
![Page 46: Gitresearchcomputing.github.io/meetup_spring_2015/pdfs/Git.pdf · Git can quickly determine whether two objects are identical or not, just by comparing names. Since object names are](https://reader034.vdocuments.mx/reader034/viewer/2022050601/5fa879fddf125d3755114550/html5/thumbnails/46.jpg)
GitX-devhttp://rowanj.github.io/gitx/
TortoiseGithttps://code.google.com/p/tortoisegit/
GitHub.com