commit 0a27d5dd12a8ae6b1661882ded4c9a8a239789ff Author: Benoit Sigoure Date: Mon Aug 27 11:15:47 2007 +0200 Explain Git's index. * course/svn.html (Things You Should Know): Here. diff --git a/course/ChangeLog b/course/ChangeLog index bfc1cc9..433b480 100644 --- a/course/ChangeLog +++ b/course/ChangeLog @@ -1,5 +1,10 @@ 2007-08-27 Benoit Sigoure + Explain Git's index. + * course/svn.html (Things You Should Know): Here. + +2007-08-27 Benoit Sigoure + Make valid XHTML 1.1. * course/svn.html: Various XHTML fixes. diff --git a/course/svn.html b/course/svn.html index 243d256..9a1c50d 100644 --- a/course/svn.html +++ b/course/svn.html @@ -173,6 +173,26 @@ You may find it convenient to watch your repository using the gitk repository as you go. +
  • +Index. +Instead of having .svn directories all over the place, Git uses a +single .git directory at the root of the working tree. This +directory contains an index file that serves a similar purpose as +the .svn directories: it's a cache that contains an efficient +representation of HEAD you can quickly diff against (among other +things). Unlike SVN, this index aka "Current Directory Cache" is also used as +a staging area to build the next commit. + +Unlike SVN, Git does not track file but content. Think of Git as a tool +slightly lower level than SVN. There are, however, higher level tools built on +the top of Git to track files (such as +StGit). As a consequence, a +commit is seen as a tree that associates file names to their content (called +"blobs"). The Git repository tracks the way the content changes and not the +way a single file changes. The index is used to incrementally +build the tree of the next commit. +
  • +

    Committing