# 4.1.1.Working tree, Index/Cache, Repository and Object

* Object
  * Git會將物件內容取出, 透過內容產生一組SHA1雜湊值, Git物件有四種: 主要是tree物件以及blob物件
    * 1.tree物件
      * 資料夾的概念, 可以包含 blob 物件的檔名與相關資訊或其他的 tree 物件
    * 2.blob物件
      * 將檔案內容進行 SHA1 雜湊運算後產生的hash id
    * 3.commit物件
      * commit 物件代表著 Git 的一次提交
        * 特定提交版本有哪些 tree 物件
        * 版本提交的時間, 紀錄訊息
        * 通常還會記錄上一層的 commit 物件名稱
    * 4.tag物件
    * tree, blob都位於物件儲存區(objects storage)物件:.git/object目錄底下
    * 透過tree, commit可以關連出blob間的關係
* Index/Cache
  * Index是**物件儲存區(objects storage)**&#x8207;**工作目錄(working tree)**&#x4E4B;間的媒介, git add等操作的目的是將物件加到索引中, git再依據索引的狀態, 決定要把那些檔案提交到**儲存庫(Repository)**&#x88E1;

    ![](https://github.com/jenhsuan/debugging-tools-experience/tree/91ad7a157f155ea77065c5600800bb4627bd1ae2/assets/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7%202017-07-04%20%E4%B8%8B%E5%8D%888.51.19.png)
* Working tree
* Repository
