Personal tools

Git

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(propose a structure)
(gc)
Line 20: Line 20:
   
 
All the different objects in Git - individual files, entire directory trees, commits and other things - are stored in a repository-wide central store. Each object is identified by computing a SHA-1 hash, which is a function of only the object's contents.
 
All the different objects in Git - individual files, entire directory trees, commits and other things - are stored in a repository-wide central store. Each object is identified by computing a SHA-1 hash, which is a function of only the object's contents.
  +
  +
=== Garbage collection and <tt>git reflog</tt> ===
  +
  +
When objects are not reachable from any root (like a branch reference), they become dangling and are subject to garbage collection. However, garbage collection does not kick in immediately.
  +
  +
When making a mistake, it is often helpful to look at commit objects by date independent of whether they are reachable, in order to be able to restore them. You can use <tt>git reflog</tt> for that.

Revision as of 20:31, 6 September 2012

WORK IN PROGRESS

This page aims to introduce the concepts behind Git in a "Haskell way".

Contents

1 The DAG

TODO

2 Branches and tags

TODO

3 Objects

3.1 Kinds of objects

TODO

3.2 The object store

All the different objects in Git - individual files, entire directory trees, commits and other things - are stored in a repository-wide central store. Each object is identified by computing a SHA-1 hash, which is a function of only the object's contents.

3.3 Garbage collection and git reflog

When objects are not reachable from any root (like a branch reference), they become dangling and are subject to garbage collection. However, garbage collection does not kick in immediately.

When making a mistake, it is often helpful to look at commit objects by date independent of whether they are reachable, in order to be able to restore them. You can use git reflog for that.