1. The blah, blah, blah part

1.1. What’s Git?

Git
A mild pejorative with origins in British English for an unpleasant, silly, incompetent, stupid, annoying, senile, elderly or childish person.

Git history +10 years

1.2. Git vs SVN

1.2.1. Snapshots, Not Differences

_images/svn-git.svg

1.2.2. Distributed vs Centrilized

_images/centralized.svg_images/distributed.svg

1.3. The 3 States of a File

_images/states.png

1.3.1. Working tree (Modified)

Indicates what files have been changed.

1.3.2. Index (Staged)

Marks changed files/lines to be committed (Saved into database)

1.3.3. HEAD (Commited)

Safely stored and indexed within the local database.

_images/areas.png

1.4. Tree structure

.git content

HEAD
branches/
config
description
hooks/
index
info/
objects/
refs/

Basic files

  • config file contains your project-specific configuration options.
  • info directory keeps a global exclude file for ignored patterns that you don’t want to track in a .gitignore file.

Important files

  • HEAD file points to the branch you currently have checked out.
  • index file is where Git stores your staging area information.
  • objects directory stores all the content for your database.
  • refs directory stores pointers into commit objects in that data (branches).