gitresearchcomputing.github.io/meetup_spring_2015/pdfs/git.pdf · git can quickly determine whether...

Post on 11-Aug-2020

9 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Git

Git Reference

http://gitref.org/

Pro Githttp://git-scm.com/book

How to think like Git

this is all Git is

The Git Object Model

The SHA

6ff87c4664981e4397625791c8ea3bbb5f2279a3

The SHA: why it's awesome

● Git can quickly determine whether two objects are identical or not, just by comparing names.

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.

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.

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.

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.

Blobs

● Content only (no filenames)● Single revision (changes are

represented as new blobs)

Trees

● Directory hierarchy and filenames● Single revision (changes are

represented as new trees which might reference existing trees and blobs)

Commits

● Annotated top-level tree● Most prominent object in day-to-

day use

Tags

● Attaches an arbitrary name to an object (usually a commit)

● Commonly used for releases

The Git Repository

and some day-to-day examples

The .git directory

The working directory

Committing a file

Committing a file

The git index

The git index

http://ericsink.com/vcbe/html/directed_acyclic_graphs.html

Remote Repositories, multiple branches, and merging

Remote repositories

Remote repositories

GitX-devhttp://rowanj.github.io/gitx/

TortoiseGithttps://code.google.com/p/tortoisegit/

GitHub.com

top related