Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
巨大リポジトリはパーシャルクローンしようね。
Search
えび
May 22, 2025
0
6
巨大リポジトリ はパーシャルクローン しようね。
えび
May 22, 2025
Tweet
Share
More Decks by えび
See All by えび
インタプリタ言語が 実行環境の差異を 吸収する仕組みを あさーく理解する
ebibibibibi
0
26
CocoaPodsはなぜRuby製か
ebibibibibi
1
130
通勤をゆたかにする技術 ~通勤中に耳でSwiftを学んだら5kg痩せて精神が安定した話~
ebibibibibi
0
160
丸め誤差発生の仕組みと向き合い方
ebibibibibi
0
110
バブルソートでPHPに入門する
ebibibibibi
0
130
影響範囲調査をする技術
ebibibibibi
0
94
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Optimizing for Happiness
mojombo
379
70k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
Producing Creativity
orderedlist
PRO
348
40k
A designer walks into a library…
pauljervisheath
210
24k
A Tale of Four Properties
chriscoyier
162
23k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Transcript
巨大リポジトリ はパーシャルクローン しようね。 #02 札幌開催:はじめてのIT勉強会 in 札幌(2025) えび(@025cm)
クローンの種類 • フルクローン • シャロークローン • パーシャルクローン
フルクローン • たぶんいつもみなさんがやっているやつ。 • すべての履歴・すべてのファイルをローカルに丸ごとコピーす ること。
シャロークローン • 履歴を深さ(=commitの数)で制限してクローンするモードの こと • 取得した履歴の範囲内でしか、歴史を操ることができない
パーシャルクローン • コミットとツリーだけをダウンロードして、 「ファイルの中身 (ブロブ)」は持ってこないモード • 履歴操作もできる!!
blob オブジェクト • blobとは Gitのオブジェクトの1種で、「ファイルの中身そのも の」を保存しているもの • Binary Large OBject
の略で、git add 実行時に .git/objects 配 下へ作成される
commitオブジェクト • commit は、「この時点でのスナップショットはこのtreeだっ た」と記録するオブジェクト。 • 中身は:tree のハッシュ(=どの構造・内容だったか)・親の commit(履歴をつなぐ)・作者・日付・メッセージ
tree オブジェクト • ある時点のディレクトリ構成(フォルダ・ファイルの階層)を 表すGitオブジェクト。 • 中身は「ファイル名・パーミッション・それが指すblobやtree オブジェクトのハッシュ値」
構造のイメージ
Gitは「差分」ではなく 「スナップショット」
blobがなにかを知っていれば、 自然な発想でパーシャルクローンは出てきそう。 基礎は大事ですね
さいごに • パーシャルクローン最強説。 • シャロークローンの勝ちポイントをよくわかってない。なにか 思いつくところがあったら教えて欲しい!