Luke Duddridge

My name is Luke, I live in Somerset, where I work as a Software Engineer

scratch

working title : Guide to being Git…ish

Creator

Git was created by Linus Torvalds (Linux)

What is Git

Porcelain commands

Plumbing commands

Usually spend most of time in porcelain commands

Break down of Git

What does does it mean when you say git is a map

Getting started

git init - creates .git

looking in .git

start .git

after adding some objects check .git/objects directory starts with first 2 characters of SHA1 made up of 3 types

Git Object Model

using git cat-file -p [SHA1] allows you to see the content of the SHA1

looking at the logs you can find the SHA1 of the commits, each subsequent commit will have a linked parent(s).

Git will reused objects in different commits if nothing has changed.

Git will start a new blob every time you change a file, but there is a layer of optimisation, as you keep working on adding content, git might choose to only save the differences. but is easier to think of each object as being related to a unique SHA1.

git cat-file

git cat-file -p sha1

-p pretty
-t type

using git hash-object will create a hashed object for the content submitted.

.gitignore

To help with exculsions of files that you might not want, you can add a repo level .gitignore file.

example: at root of repo, if I create a file called .gitignore (vi .gitignore) and add the following
obj/
bin/
.suo

any files below the area of obj and bin will be ignored as will any file of type .suo

Visual Studio has a default .gitignore that covers most of the expected objects

Tag

Tags are a pointer to a SHA1, so you can cat-file the tag or the SHA1.

What is Git

We thing that contain data called blobs, then things called trees that contains blobs and trees, the names of the blobs are named in the same tree.

This means you can have the same blob with different names in 2 different trees.

Version File System. Git is a content tracker (Stupid Content Tracker)

Merge vs Rebase

Headless

git checkout [sha1]

Distributed working

moving about the source

sources: