Gitlet design document

This is the design document for Gitlet project. Classes and Data Structures Main This is the entry point to Gitlet program. It takes in arguments from the command line and based on the command (the first element of the args array) calls the corresponding command in GitletRepository which will actually execute the logic of the command. It also validates the arguments based on the command to ensure that enough arguments were passed in. Fields This class has no fields and hence no associated state: it simply validates arguments and defers the execution to the `Gitlet`Repository class. Blob GItlet, like Git, is a content-addressable filesystem. Even one byte change in content will lead to a totally different blob object. To accomplish this, Blob class implements Serializable to save each different file content as blob object for future retrieve. Fields All the...

2023-06-15 · Ariel

用Java寫個簡單的Git:CS61B Gitlet項目筆記

在寫Git 原理學習筆記的時候,就有考慮要不要跟著網上的教程:Write yourself a Git! 用Python寫個或者是照抄一個Git,但是當時不會I/O的處理,就先放棄了。沒想到CS61B的其中一個Gitlet項目就是用Java寫一個簡單版本的Git(包含checkout,merge,reset等...

2023-06-13 · Ariel

Git 原理學習筆記

之前學CS50W的時候學過一些Git指令覺得不好理解,這次開始CS61B課程之前又再次需要用Git。既然無可避免,那就花些時間試著了解看看git到底是什麼。 注:本文為初學者學習筆記,請謹慎參考。 名詞解釋: hash function,給予內容(value),通過hash function產生...

2023-02-18 · Ariel
  | Copyright © -2025 Everydaydiva's Blog