git vocabulary

Posted in Articles

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

Staging Area – place where you put your changes to be stage and get ready to be committed.  For historical reason, this is also known as the “index”.   “git add” puts things to stage.  “git commit” pushes from staging to repository.

There are three places (trees) that a file version can be in:  (1) working directory, (2) staging, or (3) repository.

The repository is committed files.  The stage is where modified files are placed in preparation to go to repository when the commit command is invoked.  The version that goes into the repository is the version of the file at the time it went to stage.  The working directory can have modified files that needs to be staged before they can be committed to the repository.

message – a comment associated with a commit.  When you type …

git commit -m “fixed typo”

the -m stands for “message”.

parent – is like a previous commit.

pointers: three kinds of pointers.  1) Branch is a pointer to a commit.  2) A tag is like a branch but doesn’t move.  HEAD is git’s place in the repository (typically points to a branch).

DAG – Directed Acyclic Graph used by git internal.  Think of it as a tree.

SHA-1 Hash – one-way hash algorithm that git uses to see if stuff is identical.  Turns your content into a 40-char string.

For better explanation of these see Jessica Kerr’s talk at JDD Conference or read the git book.