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
Low Level Git
Search
Hiroyuki Morita
December 05, 2013
Technology
130
0
Share
Low Level Git
Hiroyuki Morita
December 05, 2013
More Decks by Hiroyuki Morita
See All by Hiroyuki Morita
Rubyistなら知っておきたい継承の話 / The inheritance for Rubyist
chiastolite
4
1.5k
esaを使って暗黙知を減らす取り組み
chiastolite
2
4.4k
git-inside
chiastolite
0
260
vagrant-itamae
chiastolite
1
1.6k
sushi for common people
chiastolite
0
360
Social Coding with GitHub
chiastolite
0
180
about Immutable Infrastructure
chiastolite
0
110
Other Decks in Technology
See All in Technology
Chasing Real-Time Observability for CRuby
whitegreen
0
120
2026年、知っておくべき最新 サーバレスTips10選/serverless-10-tips
slsops
13
5.2k
データを"持てない"環境でのアノテーション基盤設計
sansantech
PRO
1
120
Bill One 開発エンジニア 紹介資料
sansan33
PRO
6
18k
Master Dataグループ紹介資料
sansan33
PRO
1
4.6k
インターネットの技術 / Internet technology
ks91
PRO
0
210
明日からドヤれる!超マニアックなAWSセキュリティTips10連発 / 10 Ultra-Niche AWS Security Tips
yuj1osm
0
590
AWS認定資格は本当に意味があるのか?
nrinetcom
PRO
2
270
AI時代における技術的負債への取り組み
codenote
1
1.5k
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
130
Hacobu Tech Deck
hacobu
PRO
0
110
こんなアーキテクチャ図はいやだ / Anti-pattern in AWS Architecture Diagrams
naospon
1
450
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
Building Adaptive Systems
keathley
44
3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
99
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Why Our Code Smells
bkeepers
PRO
340
58k
Odyssey Design
rkendrick25
PRO
2
580
For a Future-Friendly Web
brad_frost
183
10k
Documentation Writing (for coders)
carmenintech
77
5.3k
Designing for humans not robots
tammielis
254
26k
Transcript
Low-level Git
Why Low-level Git • GitͷίΞͷ΄͏ͷ • ͳΜͱͳ͘Ͱ͍ͬͯͨίϚϯυ͕ Θ͔͖ͬͯͨ • ௐͯͨΒ͍Ζ͍Ζ͓͠Ζ͔ͬͨ
Start!!
Git Objects
> git init
> ls .git
> find .git/objects
create first commit
> ls .git/objects
3 Objects...? • Commit (f7a253e) • .git/objects/f7/a253ed90a5bb56d6cd8b3580485a7ae23acc88 • ??? (05934ea)
• .git/objects/05/934ea69782016b0fbaa7bf46d574cefb039958 • ??? (802992c) • .git/objects/80/2992c4220de19a90767f3000a79a31b98d0df7
> git cat-file -t {sha1}
Commit/Tree/Blob • Commit (f7a253e) • .git/objects/f7/a253ed90a5bb56d6cd8b3580485a7ae23acc88 • Tree (05934ea) •
.git/objects/05/934ea69782016b0fbaa7bf46d574cefb039958 • Blob (802992c) • .git/objects/80/2992c4220de19a90767f3000a79a31b98d0df7
Commit? Tree? Blob?
> git cat-file commit
Commit has... • Reference to ‘a’ Tree Object • Author
& Committer • Commit Message ! • (Reference(s) to parent)
> git ls-tree
Tree has... • Reference to Blob Objects • & File
name • & File Permission ! • (Reference to Tree Objects)
> git cat-file blob
Blob is... • commited file • don’t have a file
name
None
merge commit
commit has a parent
merge commit has parents
None
Question?
Reference
• alias to commits • ex) • HEAD • master
• some_branch • origin/master Reference?
Where is Branchs?
Where is the HEAD?
HEAD -> ref -> commit
None
Question?
Reference • ࣮ફ Git - ϨϕϧʹΔ Git • http://www.slideshare.net/youhei/ git-12695573
• ʲ༁ʳGitΛϘτϜΞοϓ͔Βཧղ͢ Δ • http://keijinsonyaban.blogspot.jp/2011/05/
appendix
example: rename
blob is not change