Gitの内部実装
.git/
#wip
可視化
http://koseki.github.io/git-object-browser/ja/#/step1/.git/
どの Git コマンドで .git ディレクトリのどこが変わるかについて、30のステップで説明
http://koseki.github.io/git-object-browser/ja-bare/#/step1/.git/
複数のリポジトリを行き来しながら、リポジトリがお互いにオブジェクトをやり取りする様子を観察できる
.gitの中身
git object
Gitのリファレンス
GItのインデックス
.git/index
リファレンスのリファレンス
.git/HEADとか
Gitのリファレンスを指し示すものが記載されている
補助的なもの
ログ
設定
「Gitのcommitは、前のcommitとの差分ではなくtreeのshopshotである」の意味
git objectに書いている
もしくは、書く
もともと100行のコードのcommitに、1行加えてcommitしたときに、
新規の1行分のデータが追加されるのではなく、
101行全体のデータが追加される
という意味
ハッシュなどの過程は踏んでいるが雑に言えばこんな感じmrsekut.icon
差分を見るときは、100行commitと101行commitを比較している
参考
Git の仕組み (1) - こせきの技術日記
詳しい。イラストもある
http://koseki.hatenablog.com/entry/2014/06/11/inside-git-2
続編
commit オブジェクト、ブランチ、タグ、stashについて
途中から読んでいないmrsekut.icon
https://www.slideshare.net/ktateish/git-concept1
https://github.blog/2022-08-29-gits-database-internals-i-packed-object-store/
めっちゃ詳しい。シリーズで5記事ある
https://github.blog/2022-08-30-gits-database-internals-ii-commit-history-queries/
https://qiita.com/a-suenami/items/8a947053c96475b57fc0
http://keijinsonyaban.blogspot.com/2011/05/git.html
https://git-scm.com/book/ja/v1/Git%E3%81%AE%E5%86%85%E5%81%B4
https://qiita.com/hogemax/items/b09abc522e0ec05da4fe
https://www.slideshare.net/DQNEO/git-yapcasia2013
https://techblog.timers-inc.com/entry/2016/11/14/113154
https://github.com/tzmfreedom/mygit/blob/master/src/Lib.hs
GitのHaskell再実装
Gitの再実装
https://orgachem.hatenablog.com/entry/2013/11/16/020500
『実用 Git 第3版』
https://git-scm.com/book/ja/v2/Git%E3%81%AE%E5%86%85%E5%81%B4-%E9%85%8D%E7%AE%A1%EF%BC%88Plumbing%EF%BC%89%E3%81%A8%E7%A3%81%E5%99%A8%EF%BC%88Porcelain%EF%BC%89
https://qiita.com/_ha1f/items/2dca1047c57d4f0bd465
https://yakst.com/ja/posts/3811
https://github.blog/jp/2021-01-06-commits-are-snapshots-not-diffs/
https://zenn.dev/kaityo256/articles/objects_of_git